FIX: fixed typo on session close 

fix an exception on session closing due to a small typo.
(document.removeListener should be document.removeEventListener)