title: Mongoose instance method is undefined
body: <p>I defined an instance method with Mongoose to authenticate a rep (user):</p>
  
  <pre><code>RepSchema.methods.authenticate = function(password){
    return this.encryptPassword(password) === this.hashed_password;
  };
  </code></pre>
  
  <p>In my app, I find the rep and call the <code>authenticate</code> method on it:</p>
  
  <pre><code>var mongoose = require("mongoose");
  var Rep = mongoose.model("Rep");
  
  Rep.findOne({email: email}, function(err, rep){
    if (rep.authenticate(req.body.session.password)){
      req.session.rep_id = rep._id;
      res.redirect('/calls', {});
    }
  });
  </code></pre>
  
  <p>However I get this error:</p>
  
  <pre><code>TypeError: Object { email: 'meltzerj@wharton.upenn.edu',
    password: XXXXXXXXX,
    name: 'meltz',
    _id: 4fbc6fcb2777fa0272000003,
    created_at: Wed, 23 May 2012 05:04:11 GMT,
    confirmed: false,
    company_head: false } has no method 'authenticate'
  </code></pre>
  
  <p>What am I doing wrong?</p>