Fix the bug where an exception is thrown if the user chooses not to log in.