Make session cookie vars compatible with mongodb