private async void logoutBtn_Click(object sender, RoutedEventArgs e) { await userManager.LogOff(); if (userManager.LogOff().IsCompleted) { mainWindow.GoToLoginPage(); } }