Created wrapper func fetchCredentials.
Cleanup.
Updated fetchCredentials func to return the expiration time.