title: What is purpose assigning an error message to req.session.error?
body: <p>In the <a href="https://github.com/expressjs/express/blob/master/examples/auth/index.js#L118" rel="nofollow noreferrer">express auth example</a>, an error message is assigned to <code>req.session.error</code> in the case of authentication failure.</p>
  <p>I assume its purpose is to inform the http client but I understood the request object comes from the client. Why is the message assigned there instead of the response object?</p>