title: Chaining Express.js 4's res.status(401) to a redirect
body: <p>I'd like to send a response code of 401 if the requesting user is not authenticated, but I'd also like to redirect when the request was an HTML request. I've been finding that Express 4 doesn't allow this:</p>
  
  <pre><code>res.status(401).redirect('/login')
  </code></pre>
  
  <p>Does anyone know of a way to handle this? This might not be a limitation of Express, since I'm asking to essentially pass two headers, but I don't see why that should be the case. I should be able to pass a "not authenticated" response and redirect the user all in one go.</p>