Fix user creation API endpoint.
Enforce type checking on API endpoints.