Change auth to $scope.auth in JS code snippet for clearer documentation