Move user logic into User model.