set up rest api for users