FIX: fixed typo on session close (document.removeListener should be document.removeEventListener)