title: A web page that requires login should redirect to the login page or simply display the form?
body: <p>When a web page offers content that require the user to log in there are two ways to have them authenticate themselves:</p>
  
  <ol>
  <li><p>The web application stores the URL, then redirects to a separate login page, then upon a successful authentication it redirects back to the stored URL;</p></li>
  <li><p>Instead of the protected content the page displays the login form (staying at the same URL), and after a successful login action the page refreshes and the real content appears.</p></li>
  </ol>
  
  <p>I'd like to know the following:</p>
  
  <ul>
  <li>If I go with option 1 what would be the correct http status code to use? (<a href="https://stackoverflow.com/questions/2839585/what-is-correct-http-status-code-when-redirecting-to-a-login-page">302 is probably the correct one</a>, so I am listing this question here only for the sake of completeness.)</li>
  <li>What would be the appropriate http status code for option 2? 401 is tempting but I don't wish to use http authentication.
  
  <ul>
  <li>A sub-question: why is http authentication so uncommon?</li>
  </ul></li>
  <li>How can I ensure that crawlers won't associate the protected content's title, keywords, description and other meta data with the login form?</li>
  </ul>
  
  <p>And actually this is what I'd really like to know:</p>
  
  <ul>
  <li>Do http status codes matter in above cases at all? Are there any pragmatic benefits from using proper status codes?</li>
  </ul>