implemented token/credentials cache