firebase $authWithPassword permission is denied
<p>When using the angularFire $authWithPassword method in my app I am receiving a Permission_Denied from firebase.  I'm very new to the Firebase Security rules and the mistake lies somewhere in how I've set them up (as it works fine when read and write are true globally).  What I'm trying to do is disallow users from deleting the major collections of my architecture but allow them to CRUD child items.  </p>

<p>So I have gifts, events, persons, and users.  And my rules look like this:</p>

<pre><code>{
  "rules": {
    ".read": true,
    "events": {
      "$id": {
        ".write": true
      }
    },
    "gifts": {
      "$id": {
        ".write": true
      }
    },
    "person": {
      ".indexOn": "created_by",
      "$id": {
        ".write": true
      }
    },
    "user": {
      "$id": {
        ".write": true
      }
    }
  }
}
</code></pre>

<p>As I said, there are no issues when using the default rules of:</p>

<pre><code>{
    "rules": {
        ".read": true,
        ".write": true,
        "person": {
          ".indexOn": "created_by"
        }
    }
}
</code></pre>

<p>What am I doing wrong?</p>

<p>EDIT:
It is not the $authWithPassword doing the write operation, it is $createUser where I create the user and in the .then I am doing a 'CreateProfile' function which uses ref.set to update properties to /users/uid.</p>

<pre><code>$scope.createAccount = function(email, pass, name, confirm) {
      loaderSvc.toggleOn('Creating account...');
      $scope.err = null;
      if( !pass ) {
        $scope.err = 'Please enter a password';
      }
      else if ( !name ) {
          $scope.err = 'Please enter a display name';
      }
      else if( pass !== confirm ) {
        $scope.err = 'Passwords do not match';
      }
      else {
        Auth.$createUser({email: email, password: pass})
          .then(function () {
            // authenticate so we have permission to write to Firebase
            return Auth.$authWithPassword({email: email, password: pass}, {rememberMe: true});
          })
          .then(createProfile)
          .then(redirect, showError);
      }

      function createProfile(user) {
        var ref = Ref.child('users/' + user.uid), def = $q.defer();
        ref.set({email: email, name: name}, function(err) {
          $timeout(function() {
            if( err ) {
              def.reject(err);
            }
            else {
              sendWelcomeEmail(email, name);
              toastr.success('Account created');
              Analytics.trackEvent('profile', 'account created', user.uid);
              def.resolve(ref);
            }
          });
        });
        return def.promise;
      }
    };
</code></pre>