added caching to server credentials check