Logging out while a background task is executing doesn't work