And for a related link about setting and reading sessions variables:

Classic ASP Design Tips - Login Page
http://www.bullschmidt.com/devtip-loginpage.asp