Implemented user login and registration.