ok
create an include file called logged in
if session("name")="" or isnull(session("name"))=true then
response.redirect("login.asp")
end if
on the login, use request.ServerVariables("HTTP_REFERER") to redirect them back to the page they came from.
edit:
fixed the server variable