Updated sessions to work with WSGI