moving passport stuff into middleware