Changed json response for registration and authentication