Moving disconnect handler to EventHandler monad