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

closes #164