[r] Only add UserCredentials hash when username and password from configuration is present