update RESTclient.php to handle token