Methods to encode user entity for registering or updating users