title: Authorize attribute not working sometimes times in my project
body: <p>I want to understand how to fix the behavior I'm encountering</p>
  
  <p>I'm doing my login in code with <code>FormsAuthentication.SetAuthCookie(user.Login, false);</code>
  Each method of my controller has the [Authorize] attribute</p>
  
  <p>My <code>web.config</code>:</p>
  
  <pre><code>&lt;authentication mode="Forms"&gt;  
    &lt;forms loginUrl="~/Login/Index" timeout="10"/&gt;
  &lt;/authentication&gt;
  </code></pre>
  
  <p>The problem is sometimes I dont go to the login page and the <code>Authorize</code> attribute passes so my controller method crashes (because there's no session data). To fix it I clear the browser cache and restart the browser only after its working. </p>
  
  <p>I think there's some trouble in my login logic? Can someone explain it and how to do it in the correct way.</p>