void Update()
    {
        if (authAttemptLogin)
        {
            timecount += Time.deltaTime;

            if (SGFirebase.Auth == 0)
            {
                errorLogin.text  = SGFirebase.LastError;
                authAttemptLogin = false;

                Loading(false);
            }
            else if (SGFirebase.Auth == 1)
            {
                errorLogin.text    = "";
                errorRegister.text = "";
                authAttemptLogin   = false;

                LoadHome();
                //Loading(false);
            }
        }

        if (authAttemptRegister)
        {
            timecount += Time.deltaTime;

            if (SGFirebase.Auth == 0)
            {
                errorRegister.text  = SGFirebase.LastError;
                authAttemptRegister = false;

                Loading(false);
            }
            else if (SGFirebase.Auth == 1)
            {
                errorLogin.text     = "";
                errorRegister.text  = "";
                authAttemptRegister = false;

                infoLogin.text = "Registration successful. Please do not forget to validate your email before the first login.";
                OnClick_ActiveLogin();
                Loading(false);
            }
        }

        if (authAttemptForgot)
        {
            timecount += Time.deltaTime;

            if (SGFirebase.Auth == 0)
            {
                errorForgot.text  = SGFirebase.LastError;
                authAttemptForgot = false;

                Loading(false);
            }
            else if (SGFirebase.Auth == 1)
            {
                errorLogin.text   = "";
                errorForgot.text  = "";
                authAttemptForgot = false;

                infoLogin.text = "Email successfully sent. Please follow the instructions on it before login.";
                OnClick_ActiveLogin();
                Loading(false);
            }
        }

        if (timecount > timeout)
        {
            errorLogin.text     = "The server response is taking too long... try again ?";
            errorRegister.text  = "The server response is taking too long... try again ?";
            errorForgot.text    = "The server response is taking too long... try again ?";
            authAttemptLogin    = false;
            authAttemptRegister = false;
            authAttemptForgot   = false;
            SGFirebase.AuthCancelAttempts();
            Loading(false);
            timecount = 0f;
        }
    }