Updated the controller for user views