title: Best authentication way for .NET Web API + Static HTML + JS
body: <p>I'm developing a web application consuming a REST .NET Web API.
  My web API is stateless and I'm using static HTML and JQuery requests.</p>
  
  <p>Question....
  What's the best way to do the login/password autentication?</p>
  
  <p>Application flow:</p>
  
  <ol>
  <li>API XHR request</li>
  <li>API response with status 401</li>
  <li>JS redirect to login page</li>
  <li>API Authentication XHR request (with login and password)</li>
  <li>API response with a token</li>
  <li>New API XHR request (with token)</li>
  <li>API response with data</li>
  </ol>