title: Uncaught Error: Must set options.password in Meteor
body: <p>I am trying to create multiple users so I did a sample example of "Create Users" using <code>Accounts.createUser</code>. I have added a packages <code>accounts-base</code> and <code>accounts-password</code> also. But I got an error <code>Must set options.password in Meteor</code>. I have no idea what happening. Check out the code code below.</p>
  
  <p><strong>Only clicking Register Button at that time I got the error</strong></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;head&gt;
    &lt;title&gt;loginapp&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    {{&gt; main}}
  &lt;/body&gt;
  
  &lt;template name="main"&gt;
      &lt;form id="login-form" action="action"&gt;
          &lt;div&gt;
              &lt;h2&gt;Login&lt;h2&gt;
              &lt;input type="text" id="email" placeholder="Email" /&gt;&lt;br&gt;
          &lt;input type="password" id="pwd" placeholder="Password" /&gt;&lt;br&gt;
          &lt;input type="submit" value="Login" id="login" /&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  
      &lt;form id="register-form" action="action"&gt;
          &lt;div&gt;
              &lt;h2&gt; Create Account&lt;h2&gt;
              &lt;input type="text" id="username" placeholder="Enter UserName" /&gt;&lt;br&gt;
              &lt;input type="text" id="name" placeholder=" Enter Name" /&gt;&lt;br&gt;
              &lt;input type="text" id="email" placeholder=" Enter Email" /&gt;&lt;br&gt;
              &lt;input type="password" id="pwd" placeholder=" Enter Password" /&gt;&lt;br&gt;
              &lt;input type="submit" value="Register" id="register" /&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>if (Meteor.isClient) {
      Template.main.events({
          'submit #login-form': function (e, t) {
              // template data, if any, is available in 'this'
              console.log("You pressed the button LOGIN ");
              e.preventDefault();
              // retrieve the input field values
              var email = t.find('#email').value
                  , password = t.find('#pwd').value;
              console.log(email);
              Meteor.loginWithPassword(email, password, function (err) {
                  if (err) {
                      console.log(err);
                      Session.set("loginError", true);
                  } else {
                      console.log(" Login Success ");
                  }
              });
          }
      });
  
      Template.main.events
      ({
          'submit #register-form': function (e, t) {
  
              console.log("You pressed the button Register ");
              e.preventDefault();
              var username = t.find('#username').value
                  , name = t.find('#name').value
                  , email = t.find('#email').value
                  , password = t.find('#pwd').value;
  
  
              Accounts.createUser({email: email, password: password, username: username, }, function (err) {
                  if (err) {
                      console.log(err);
                  }
                  else {
                      console.log("Register Successfully");
                  }
              });
          }
      });
  }
  
  if (Meteor.isServer) {
      Meteor.startup(function () {
          // code to run on server at startup
          if (Meteor.users.find().count() === 0) {
              Accounts.createUser
              ({
                  username: 'username',
                  email: 'abc.n@gmail.com',
                  password: '123456',
                  profile: {
                      first_name: 'fname',
                      last_name: 'lname',
                      company: 'CubeTech',
                  }
              }) //Added close parenthesis.
          }
      });
  }
  </code></pre>