changed login method