write the code of the user controller