Sets up routes
Completes authentication