add makeCredentials function (fixes #109)