Added commands to get and restore session state