Add function to create a new authorization
Fix JSON encoding