when a session is empty, remove it.