cookie handler middleware for em-session-manager