Remove url parameters when logging in/out

This fixes the logout/login again issue.

@tejohnso please review