modify login method