Fix return type of createUser and createIdentityObject