FGCP: refactor authentication to use FGCPCredentials and pems

Extracted from PR #94 and updated according to Adrian's feedback.