private async void LogIn_ClickAsync(object sender, EventArgs e) { try { string resp = ""; resp = await ApiFunctions.Login(textUsername.Text, textPassword.Text); if (resp == "Login succesfull.") { await LoadActivityMainAsync(); } loginResponse.Text = resp; } catch (Exception xe) { //MessageBox.Show() loginResponse.Text = xe.Message; } }