Added support for existing token

use either existing token or generate new token