added cache for get_token_by_credentials