title: how to add login error flash message in passport js
body: <p>I wish to display a flash message on my log in form, thats when the user gives a wrong credential in the form, but i don't know where to add the flash am confused a bit. anyone around help out please.</p>
  
  <pre><code>app.post('/login',passport.authenticate("local", {
  successRedirect: "/",
  failureRedirect: "/login"
  }), function(req, res){
  req.flash('error', err.message)
  })
  </code></pre>
  
  <p>i would still like it to display the error from the form. am new to this any 
   help   </p>
  
  <pre><code>req.flash('error', err.message)
  </code></pre>