refactoring (logic moved to controllers, configs added), passport modules added