Once in the login.asp page, after you have validated the user, save the userid to the Session variable called UserId. Then next few lines is used to see if the user has cookies turned off. If so, none of this works since the Session object needsto write a cookie to retain its state. If cookies are turned off, then the Session variable LoginFrom set back on the first page will be empty.
If cookies are turned on, then the code redirects back to the page that called it.
In order for this to work, you shouldn't link to the login.asp page directly. Instead, link to one of the other pages and let that page redirect to login.asp if needed.
Let me know if you need help with the login.asp page. Basically it should have a form that posts to the login.asp page. The form should contain an input box for id and one for password, and a submit button. Add VB script at the top of the page to see if the submit button is empty or not - if it's not then the submit button has been pressed,if it is empty then this is the first time loading the page. Something like:
If Not IsEmpty(Request.Form("cbtLogin")) Then
sUserId = Request.Form("tbxUserId")
sPassword = Request.Form("tbxPassword")
..validation stuff
..redirect stuff
EndIf
'If cbtLogin is empty, load the page like normal.
Once you have the UserId, look up the Password from the database Where Userid = sUserId and compare that password with sPassword.
Let me know if you need more info.
Hope this helps.