title: How to do the proper login in a website
body: <p>I am a new bee creating an asp.net web application for my application. I will have different users and i didn't use any special forms or methods to do the login. I have access db , in there i have some user role, company,username , and password.
  In my login page through text box i will get company username and password inputting by the end user. then i will check for the company and username (which is primary key in the table.) if the password matches then will find the user role and redirect to the pages for each user.
  that works fine now.
  I have a log out button which is sitting in the sitemaster page and </p>
  
  <pre><code>      &lt;div id="logout" runat="server" visible="false" class="navbar-brand1"&gt;  
                    &lt;a id="lo"  runat="server" href="/Default"&gt;Log Out &lt;/a&gt;
              &lt;/div&gt; 
  </code></pre>
  
  <p>then in the pages where i want to show the log out i will call the code</p>
  
  <pre><code>    Master.FindControl("logout").Visible = true;
  </code></pre>
  
  <p>it was working fine in respect of login in and login out . but infact the log out button just redirects to the first page on site and if we do the back arrow in the browser i can go back to the prevs page i was on. Is there any way i can do it neatly so that after log out even though if i go back on the browser it will ask for log in .</p>
  
  <p>Any help will be really appreciated. I made a mistake and created complete application now i am worried about this feature so technically i am not logging out  :( </p>