Fix error in routes and user model