updated user api controller to use a Spring MVC ResponseEntity for the response.