title: how to get request path with express req object
body: <p>I'm using express + node.js and I have a req object, the request in the browser is /account but when I log req.path I get '/' --- not '/account'.</p>
  
  <pre><code>  //auth required or redirect
    app.use('/account', function(req, res, next) {
      console.log(req.path);
      if ( !req.session.user ) {
        res.redirect('/login?ref='+req.path);
      } else {
        next();
      }
    });
  </code></pre>
  
  <p>req.path is / when it should be /account ??</p>