public function disconnect()
    {
       
        if ($this->isConnected()){
            $this->outVerbose("Disconnecting user...");
            $userService = tao_models_classes_UserService::singleton();
            if ($userService->logout() == true){
                $this->outVerbose("User gracefully disconnected from TAO API.");
                $this->setConnected(false);
            }
            else{
                $this->error("User could not be disconnected from TAO API.");
            }
        }
       
    }