title: failed: Access denied on meteor collection
body: <p>This Meteor app has the insecure and autopublish removed and accounts-password added.<br>
  It uses <code>Accounts.createUser({username: someName, password: somePwrd});</code>  which can be verified on the mongo prompt. </p>
  
  <p>I am trying to <code>Tasks1.insert(params);</code> and getting access denied  </p>
  
  <p>I don't know why it get Access denied for update and insert on the browser console. Please tell me why and how to fix it? Thanks</p>
  
  <pre><code>//both.js
  Tasks1 = new Mongo.Collection('tasks1');
  /////////////////////////////////////////////////////
  
  //server.js
  Meteor.publish('tasks1', function(){
    return Tasks1.find({userId: this.userId});
  });
  
  Meteor.methods({
    logMeIn: function(credentials) {
      var idPin = credentials[0] + credentials[1];
      Accounts.createUser({username: idPin, password: credentials[1]});
    }
  });
  
  Meteor.users.allow({
    insert: function (userId, doc) {
     console.log(userId);
     //var u = Meteor.users.findOne({_id:userId});
    return true;
  }
  });
  /////////////////////////////////////////////////////  
  
  //client.js
  Template.login.events({
     'click #logMe': function() {
     var credentials = [$('#id').val(), $('#pin').val()];
     Meteor.call('logMeIn', credentials, function(err, result) {
      if (result) {
        console.log('logged in!');
      }
    });
   }
  });
  Template.footer.events({
    'click button': function () {
      if ( this.text === "SUBMIT" ) {
        var inputs = document.getElementsByTagName('input');
        for (var i = 0; i &lt; inputs.length; i++) {
         var params = {};
         params[inputs[i].name] = inputs[i].value;
         Tasks1.insert(params);  //&lt;&lt;&lt;&lt;&lt;&lt;----------------------
      }
    }
   }
  });
  </code></pre>