when redirecting to /login, save the url and params to redirect back to

closes #164
for normal requests to /login, save the referrer and redir back there

properly closes #164