method to create a new user and get a user by the id