test for credentials caching