normalize pocument api calls to pass user object back and forth