Fix error in User model and user controller