I do not have access your entire project, but from your shared code snippet, I would guest:
1. viewModelScope is Cancelled
viewModelScope is tied to the lifecycle of the ViewModel. If the ViewModel is cleared before isUserLoggedIn() finishes executing, all its coroutines get canceled automatically.
2. isUserLoggedIn() is Being Called Multiple Times, Canceling Previous Calls