Update the code for the 'Login' method to pass the test