public function validateToken($token)
    {
        if (isset($_SESSION[$this->session_name])) {
            if ($_SESSION[$this->session_name] === $token) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }