Added credential caching