Redirect back with query params on login/logout