title: What HTTP code to use in "Not Authenticated" and "Not authorized" cases?
body: <p>I read that <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" rel="nofollow">"401 Unauthorized"</a> code must be used when a user:</p>
  
  <ol>
  <li>Is not logged, but login is required ("not authenticated");</li>
  <li>Is logged, but his profile don't allow to see that url ("not authorized");</li>
  </ol>
  
  <p>According to RFC, in both cases server must return <code>401</code> code.
  But I need to differentiate then in my ajax requests.</p>
  
  <p>Anybody have a tip to solve this?</p>
  
  <p>Note: I don't want to use <code>403 Forbidden</code> code, because in 403 <code>"Authorization will not help"</code>, according to RFC.</p>