Revise login function and its parameters to match the server