json and tests for UserResource