Implemented user authentication