Update the Login function.