urir10:but if the user clicks the back button it will go the last page that only logged in users can go ,if you click any link after you go back it will go to the login page but still i need to disable it from being able to go even one page back. How can i do that?
Try to disable page caching , Add this line to your page load ,
Response.Cache.SetCacheability(HttpCacheability.NoCache)
To avoid repeating that line , you can create a base calss for your pages , or if you are using master page ,you can just place that line in its Page_load method ,
urir10:And also another problem im facing is that after i logout, i created a logout page that says "you are now logged out" or whatever, and then i have a button to return to the login page. after i click that button and login again it opens the logout page right away. why is that?
Try to handle the Loggedin event for your login control , and place response.Redirect( your home page) code there .