Router

Refactored Router - now login flow should be clearer.