New credentials API not used correctly

When the code was modified for the new credentials API, these lines were left unchanged. As there was never a username value (as it is user not username) the credentials were never added to the generated URL, resulting in "Unauthorized" errors when an operation was finally executed on the connection.