Well its hard to say in your specific instance how the classes would be structured because that would depend slightly on your implementation. But classes allow you to create objects with defined functions. The insides of these functions can change and still everything interacts the same. In other words, if you were, on one site to have users stored in a text file and in other have them stored in a database all you would have to change is your user functions. Everything else would stay the same and call the same functions.
Basically, classes define, via their functions an interface for other code to interact with. The function never change, or shouldn't change that much, as far as name and arguments. But the actual implementation of the function can change. Therefore, you could create a function in a User class that defines a valid/invalid login and that function simply returns true if the login is valid, false otherwise. But the key is the function takes care of the actual work of logging a user in to the system. That work can change in any manner, the function still returns the same thing.
This same principles can be applied in all different areas. Something like a delete thread function, or a create thread function.
Inherently this helps portability because, with simple changes to the functions of a few classes you can change how the entire system works. However, this would also mean you would have to design your classes in such a way as to make each class a self-contained unit. That's the entire idea of classes. To create objects that can be used. For example, a car could be an object, or a bicycle each made up of other objects like steering wheel, etc.
Hope that helps!