login button now redirects to current page after login

Closes #540