sahat/hackathon-starter — pull request #95 by ammit (2014-03-02 19:41:30+00:00)
Title: redirect to original url after login

Added redirect to original page feature to hackathon-starter. I used the query string with param `r` to pass original url.

`postLogin` controller handles them and redirects to after successful login, On unsuccessful login it again passes them to login page.

I also added flash message "You're not logged in" to show after redirection.

To add current path directly to links I exposed `req.path` variable to locals so we can use that to modify Login links in `navigation.jade`.

- Express decodes URI params by default