Implement toggleState session variables.