in reply to Login/Logout

If I understood clearly you need to restrict access to some web pages. So, first you can use Apache features for that: Authentication, Authorization and Access Control.

Second way is using sessions. Have a look Apache::Session or CGI::Session. Also, there are good CGI::Session Tutorial and CGI::Session CookBook.

Michael Stepanov aka nite_man

It's only my opinion and it doesn't have pretensions of absoluteness!