WSGI middleware layer to provide sessions