Implemented user login functionality