Added mock session middleware.