title: Cannot read property '_id' of undefined express mongoose
body: <pre><code>router.get('/profile',function(req,res,next){
  
    User.findOne({_id : req.user._id },function(err,user){
  
      if(err) next(err);
  
      res.render('/accoutns/profile',{user:user});
    });
  
    });
  </code></pre>