add user authentication logic