implemented user authentication