Implemented authenticate for User entity