add the REST endpoint for the user model and fix small bugs