Issue login redirect 40x

This PR addresses two small issues:

 1. When trying to access a page that 403/404's, then subsequently logging in, nodebb redirects you back to the 403/404 page.

2. When trying to access http://nodebb/login directly: Upon logging in successfully, app.previousUrl is undefined, so the login.js code breaks until you refresh/click other links. 

So, just two small fixes for that.

gn!