updated user controller to respond with HTML & JSON