
use EPrints;

use strict;

my $session = EPrints::Session->new();

my $url = $session->param( "target" );
my $c = $session->{request}->connection;

my $code = $c->notes->get( "cookie_code" );

if( !defined $url ) { $url = "/cgi/users/home"; }

my $page = $session->make_doc_fragment;

$page->appendChild( $session->render_message( 
	"message",	
	$session->html_phrase("cgi/login:message") ) );

#$page->appendChild( $session->html_phrase( 
#	"cgi/login:link_text",
#	link=>$session->render_link( $url ) ) );

my $title = $session->html_phrase( "cgi/login:title" );
$session->build_page( $title, $page );
$session->send_page();

$session->redirect( $url );

$session->terminate;

