bug in loadCredential(), commented out for now