private async void loginBtn_Click(object sender, RoutedEventArgs e) { LoginBinder loginBinder = new LoginBinder() { Username = usernameTextBox.Text, Password = passwordTextBox.Password, }; string[] errors = userManager.Login(loginBinder); if (errors.Length == 0) { //Login successful } else { //Login Failed } }