support read-only mode and change sessions.