title: MongoDB login with user account
body: <p>I created a administrative user according to the doc:</p>
  
  <pre><code>use admin
  db.createUser(
    {
      user: "siteUserAdmin2",
      pwd: "password",
      roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
    }
  )
  </code></pre>
  
  <p>Then I create a user in Mongodb console:</p>
  
  <pre><code>use x
  db.createUser(
      {
        user: "xuser",
        pwd: "xuser123",
        roles: ["readWrite"]
      }
  )
  </code></pre>
  
  <p>I can log in to the admin user in console like this:</p>
  
  <pre><code>mongo --port 27017 -u siteUserAdmin -p password --authenticationDatabase admin
  </code></pre>
  
  <p>But how do I login the user account?</p>
  
  <p>I tried the username and password it wouldn't let me through. I also don't know what to put in <code>--authenticationDatabase</code>. I cannot log in using Mongoose either. </p>
  
  <p>Any help appreciated, thanks.</p>