Automatically release the host session when the last session is closed