// Sign in with Email and Password
passport.use(new LocalStrategy({ usernameField: 'email' }, function(email, password, done) {
  User.findOne({ email: email.toLowerCase() }, function(err, user) {
    if (!user) {
      return done(null, false, 'The email address ' + email + ' is not associated with any account. ' +
        'Double-check your email address and try again.');
    }
    user.comparePassword(password, function(err, isMatch) {
      if (!isMatch) {
        return done(null, false, { message: 'Invalid email or password.' });
      }
      return done(null, user);
    });
  });
}));

// Sign in with Email and Password
passport.use(new LocalStrategy({ usernameField: 'email' }, function(email, password, done) {
  User.findOne({ email: email.toLowerCase() }, function(err, user) {
    if (!user) {
      return done(null, false, 'The email address ' + email + ' is not associated with any account. ' +
        'Double-check your email address and try again.');
    }
    user.comparePassword(password, function(err, isMatch) {
      if (!isMatch) {
        return done(null, false, 'Invalid email or password');
      }
      return done(null, user);
    });
  });
}));

Return local strategy error message as string, not object
Return local strategy error message as string, not object
