FGCP: refactor authentication to use FGCPCredentials and pems