async private void AuthorizeLogin(DTO_User user) { DrawMe dm = new DrawMe(); dm.Show(); bool b = false; while (!b) { Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait; b = await BuildLookupLists(); Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait; await s1.Login(user); getCurrentLogInUser(); Mouse.OverrideCursor = Cursors.Arrow; } int j = 3; NexusHome Page = new NexusHome(); StringBuilder s = new StringBuilder(); s.Append("The username and password combination is not what is on file. / n / r You have failed to login "); s.Append(i.ToString() + " of " + j.ToString() + " times. /r/n If you fail " + (j - i).ToString() + " more time"); if (j - i > 1) { s.Append("'s"); } s.Append(" your account will be locked until administration restores your credentials."); if (s1.LoggedInEmployee != null) { this.NavigationService.Navigate(Page); } else { MessageBox.Show(s.ToString(), "Login Failure", MessageBoxButton.OK, MessageBoxImage.Error); } LoginBtn.IsEnabled = true; }