Modify login method