* Debugged all possible ways for a session to terminate; do them cleanly.