in reply to CGI::Application redirect loses cookie
$self->redirect('admin.cgi?' . $self->session->name . '=' . $self->ses +sion->id); [download]
Another idea would be to make sure you have already sent the cookie with login.tmpl.