modify the doLogin