Adds session event before-close, so we can hook some behavior before bye message is sent