protected void autoLogin()
        {
            mySqlConnector mySqlconn = new mySqlConnector();
            if (mySqlconn.isInitialized())
            {
                responseText.Visible = true;
                if (mySqlconn.login("*****@*****.**", "testing"))
                {
                    //validated, so write user session info
                    Session["firstname"] = mySqlconn.UserObj.FirstName;
                    Session["lastName"] = mySqlconn.UserObj.LastName;
                    Session["emailAddress"] = mySqlconn.UserObj.Email;
                    Session["isConsignor"] = mySqlconn.UserObj.isConsignor;
                    Session["isAdmin"] = mySqlconn.UserObj.isAdmin;
                    Session["userId"] = mySqlconn.UserObj.UserId;
                    Session["isLoggedIn"] = true;

                    //close connection
                    mySqlconn.deInitialize();

                    redirectUser();
                }
                else
                {
                    //displayResponseMessage(true, "Email & password combination are incorrect.  <br/>Please try again.");
                    displayResponseMessage(true, mySqlconn.connErrMsg);
                }
            }
            else
            {
                string whatGives = mySqlconn.testConnection();
                displayResponseMessage(true, "Database Connection Failure: " + whatGives);
            }
        }
        protected void authenticateUser()
        {
            mySqlConnector mySqlconn = new mySqlConnector();
            if (mySqlconn.isInitialized())
            {
                if (mySqlconn.login(EmailAddress.Text, Password.Text, false))
                {
                    //validated, so write user session info
                    Session["firstname"] = mySqlconn.UserObj.FirstName;
                    Session["lastName"] = mySqlconn.UserObj.LastName;
                    Session["emailAddress"] = mySqlconn.UserObj.Email;
                    Session["isConsignor"] = mySqlconn.UserObj.isConsignor;
                    Session["isAdmin"] = mySqlconn.UserObj.isAdmin;
                    Session["userId"] = mySqlconn.UserObj.UserId;
                    Session["isLoggedIn"] = true;

                    //close connection
                    mySqlconn.deInitialize();
                    //success!
                    redirectUser();
                }
                else
                {//AUTHENTICATION HAS FAILED
                    //displayResponseMessage(true, "Email & password combination are incorrect.  <br/>Please try again.");
                    string errMsg = mySqlconn.connErrMsg;

                    if (errMsg.IndexOf("Please register") > 0)
                    {
                        displayResponseMessage(true, errMsg);
                    }
                    else
                    {
                        displayResponseMessage(true, mySqlconn.connErrMsg);
                        return;
                    }
                }
            }
            else
            {
                string whatGives = mySqlconn.testConnection();
                displayResponseMessage(true, "Database Connection Failure: " + whatGives);
            }
        }
        protected void saveUserInfo(Dictionary<string, string> formInfo)
        {
            saveErr = "";

            try
            {
                mySqlConnector mySqlConn = new mySqlConnector();
                if (mySqlConn.isInitialized() && mySqlConn.registerUser(formInfo))
                {
                    saveErr = mySqlConn.login(Email.Text, Password.Text) ? "" : mySqlConn.connErrMsg;
                    if (saveErr != "")
                    {
                        displayFormErrors();
                        mySqlConn.deInitialize();
                    }
                    else
                    {   //write session out for sng
                        Session["emailAddress"] = Email.Text;
                        Session["firstName"] = FirstName.Text;
                        Session["lastName"] = LastName.Text;
                        Session["isLoggedIn"] = true;
                        Session["userId"] = mySqlConn.UserObj.UserId;

                        //push user to success page and consignment agreement
                        mySqlConn.deInitialize();
                        Response.Redirect("RegisterSuccess.aspx");
                    }
                }
                else
                {
                    if (mySqlConn.connErrMsg == "already registered")
                    {
                        saveErr = "Email Address already registered.";
                    }
                    else
                    {
                        //TODO: refactor this code to produce a more specific error that can be reported??
                        saveErr = mySqlConn.connErrMsg;
                    }
                    displayFormErrors();
                }
            }
            catch (Exception ee)
            {
                saveErr = ee.Message.ToString();
                displayFormErrors();
            }
        }