/// <summary>
        /// Buttonclick to register a client
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btn_Register_Client_Click(object sender, EventArgs e)
        {
            if (CheckUserInput())
            {
                string username = tbox_Username.Text;
                string password = tbox_Password.Text;
                string email = tbox_Email.Text;
                string givenname = tbox_GivenName.Text;
                string adress = tbox_Adress.Text;
                string location = tbox_Location.Text;
                string phonenumber = tbox_PhoneNumber.Text;
                string haslicense = cbox_HasLicense.Checked.ToString();
                string hascar = cbox_HasCar.Checked.ToString();
                string ovpossible = cbox_OVPossible.Checked.ToString();
                Client newclient = new Client(username, password, email, givenname, adress, location, phonenumber, haslicense, hascar, ovpossible);

                if (loginhandler.AddAccount(newclient))
                {
                    ADMethodsAccountManagement admng = new ADMethodsAccountManagement();
                    admng.CreateNewUser(username, password, givenname, email);

                    Response.Redirect("login.aspx");
                }
            }
        }
        /// <summary>
        /// Button click to register a volunteer
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btn_Register_Volunteer_Click(object sender, EventArgs e)
        {
            if (CheckUserInput())
            {
                DateTime dateofbirth;
                if (CheckVolunteerInput(out dateofbirth))
                {
                    string username = tbox_Username.Text;
                    string password = tbox_Password.Text;
                    string email = tbox_Email.Text;
                    string givenname = tbox_GivenName.Text;
                    string adress = tbox_Adress.Text;
                    string location = tbox_Location.Text;
                    string phonenumber = tbox_PhoneNumber.Text;
                    string haslicense = cbox_HasLicense.Checked.ToString();
                    string hascar = cbox_HasCar.Checked.ToString();
                    string photofilename = DateTime.Now.ToString("yyyyMMddmmss") + Path.GetFileName(FU_UploadPhoto.FileName);
                    string vogfilename = DateTime.Now.ToString("yyyyMMddmmss") + Path.GetFileName(FU_UploadVog.FileName);

                    Volunteer newvolunteer = new Volunteer(username, password, email, givenname, adress, location, phonenumber, haslicense, hascar, dateofbirth, photofilename, vogfilename);

                    if (loginhandler.AddAccount(newvolunteer))
                    {
                        FU_UploadPhoto.SaveAs(Server.MapPath("~/profileimg/") + photofilename);
                        lbl_UploadPhotoError.Text = "SUCCESS";
                        FU_UploadVog.SaveAs(Server.MapPath("~/vog/") + vogfilename);
                        lbl_UploadPhotoError.Text = "SUCCESS";

                        ADMethodsAccountManagement admng = new ADMethodsAccountManagement();
                        admng.CreateNewUser(username, password, givenname, email);

                        Response.Redirect("login.aspx");
                    }
                    else
                    {

                    }
                }

            }
        }
 /// <summary>
 ///  Not in use
 /// </summary>
 public void foobar()
 {
     ADMethodsAccountManagement admng = new ADMethodsAccountManagement();
     System.DirectoryServices.AccountManagement.UserPrincipal user = admng.CreateNewUser("OU=Participation,DC=bedrijfpts13,DC=com", "Testuser", "Testpassword", "Sjakie", "Test");
 }