implement RESTful user authentication