Defining a user class for endpoint controller