Updated ProfileController and ProfileService to follow the same pattern as UserController and UserService in error handling and database access.