X-Registry-Auth should be now JSON and Base64

I'm assuming that `cfg.authconfig` is a JSON object of the form:

    {
        username: "bob",
        password: "password123",
        email: "bob@example.com"
    }

If that's the case we need to stringify and base64 encode it.