fixing a bug where the login request was being redirected after logging in, causing the getting of the login cookie to fail