Cleanup the session handling to harden the system