Refactored server models and added passport and routing authentication