Changes to login method