Refactors passport authentication.
Refactors config outside of the server file