Set pathname to null to disable session persistence