Patch on initialize middleware to work with node-client-sessions