Changes integer based ids to uuid4 ids.
Fixes a typo.
Cast user identifier to a string that the authentication policy can understand.
Serialize UUIDs to strings for JSON output.