private void Button_Click(object sender, RoutedEventArgs e)
 {
     (new LoadingWindow()).Show();
     CoreClass.TryLogin(UsernameBox.Text, PasswordBox.Password);
     if (CoreClass.isLogin == true)
     {
         CoreClass.shouldCloseLoading = true;
         MessageBox.Show("Connected successfully!");
     }
     else if (CoreClass.isLogin == false)
     {
         CoreClass.shouldCloseLoading = true;
         MessageBox.Show("Error, could not connect!");
     }
 }
 public static async void TryLoginAsync(string username, string password)
 {
     CoreClass.TryLogin(username, password);
 }