public async void CreateAccount_Clicked(object sender, EventArgs e) { if (confirmpassword.Text != password.Text) { await DisplayAlert("Alert", "Passwords do not match!", "OK"); } else if (PasswordCheck(password.Text) == false) { await DisplayAlert("Alert", "Password must be at least 8 characters, and contain an uppercase letter, a number, and a special character.", "OK"); } else { string emailAddress = email.Text; string pass = password.Text; string userName = name.Text; DateTime userdob = dobChosen; bool token = await createAcct.CreateUserAccount(emailAddress, pass, userName, userdob, userPublicAcct); if (token == true) { await DisplayAlert("Success", "User account created. You will be redirected to the login screen now, and may update your profile once logged in.", "OK"); await Navigation.PushAsync(new LoginController()); } else { await DisplayAlert("Failed to Create Account", "A user with this email address already exists.", "OK"); } } }