I have a social network-esque site with a nice User model that seems to be covering all my bases right now.
I am reworking the code from spaghetti and want to find the best-practice solution for logging in / registering a user. Here are my options (I think):
Create a separate Auth class (model?) that simply searches for a record of a user and returns a new User object if found.
Add "login" functionality to the User class that will allow me to log my user in as any User object that I'd like.
Please let me know the cleanest way to go about this, as I am new to good coding practices (admittedly)