Detach broken sessions before closing

Since we may be in the process of re-joining a session
as opposed to creating one, detach before calling
router.destroySession to be safe. This is in response
to odd logouts in web.