Add more general support for passing credentials to curl