Rest api

user tests refactored & status codes