Modify credential implementation

So that there is now a generic ApiCredential to hold service, ID and secret.