Updated client to generate toekns from endpoint urls
BUgfixes and issue resolution