Move static middleware above session