Fixed the redirect after logging in bug