title: PreserveLoginUrl Override for MVC 4
body: <p>I have a controller action which is called from a jquery method on the client and returns JSON.  I may need to return a 401 from this action in some cases.  Standard MVC will create a response that redirects the user to the login page if I try to issue a 401 as long as PreserveLoginUrl is set to true in web.config.  I want to be able to override PreserveLoginUrl on certain actions so that a true 401 is sent to the client.  However, for the majority of actions, PreserveLoginUrl=true is the correct behaviour so I want that maintained.</p>
  
  <p>Any suggestions on how I can accomplish a true 401 without a redirect for a handful of actions while maintaining the PreserveLoginUrl=true functionality?  For now, I am returning a 400 instead of a 401 as a workaround, but that is not really the correct behaviour since I do want to issue a NOT Authorized.</p>