Implemented login method