package LIMS::Controller::Login;

use strict;

use base 'LIMS::Base';

# this should not normally be called (ie/hmds/login), but just in case,
# load login.tt & display 'already logged in' message:
sub default : StartRunmode {
    my $self = shift; $self->_debug_path($self->get_current_runmode);

    return $self->tt_process('site/login.tt');
}

sub logout : Runmode {
    my $self = shift; $self->_debug_path($self->get_current_runmode);

    # tidy up:
    $self->authen->logout;
    $self->session_delete;

    return $self->redirect( $self->query->url );
}

1;



