title: Issue with nodejs bcrypt when using keyword this
body: <p>I am new to nodejs but I am trying to use it as server for an online game I am designing. I come across the tutorial and I am just playing around with the code to see how I can modify it to suit me need. 
  <a href="https://github.com/scotch-io/easy-node-authentication/tree/linking" rel="nofollow noreferrer">https://github.com/scotch-io/easy-node-authentication/tree/linking</a></p>
  
  <p>1 thing I couldn't solve however is while using bcrypt, my code below is trying to isolate the issue:</p>
  
  <pre><code>//check-hash
  
  var bcrypt   = require('bcrypt-nodejs');
  var salt = bcrypt.genSaltSync(8);
  
  var newAccount = {
      username: "admin",
      password: "1235",
      email: "test@domain.com",
      AccCreateOn: Date.now(),
      LastLogin: Date.now()
  }
  newAccount.generateHash  = function(password) {
      return bcrypt.hashSync(password,  salt);
  };
  
  // checking if password is  valid
  newAccount.validPassword  = function(password) {
      return bcrypt.compareSync(password,  this.password);
  };
  console.log (newAccount.password);
  newAccount.password = newAccount.generateHash(this.password);
  console.log(newAccount.validPassword("1235")); //false
  console.log(newAccount.validPassword("1236"));//false
  </code></pre>
  
  <p>I already figure out the line at fault is</p>
  
  <pre><code>return bcrypt.compareSync(password,  this.password);
  </code></pre>
  
  <p>which if I change <strong>this.password</strong> to <strong>newAccount.password</strong> it will work just fine.</p>
  
  <p>what is wrong as I thought this.password in this context is newAccount.password, or is it not?</p>