Added session handling to the control panel