title: How to redirect another page after successfully login nodejs
body: <p>I'am trying to sending client to next page when login process is successful done,page is confirm page.but i am geting some error.
  <a href="https://i.stack.imgur.com/jb8Xm.png" rel="nofollow noreferrer">image screenshot</a></p>
  
  <pre><code>router.post('/sign_in', urlend, function(req, res) {
    var email = req.body.user_id;
    var password = req.body.password;
    if (email != '' &amp;&amp; password != '') {
      user_modell.findOne({
        email: email,
        password: password
      }, function(err, data) {
        if (err) {
          //res.status(500).send();
          console.log('error');
        } else if (!data) {
          console.log('Incorrect User ID or Password');
          return res.end();
        } else {
          res.render("confirm");
        }
      });
    }
    res.end();
  });
  </code></pre>