Fixed logout task clearing