title: res.sendFile() not sending file (no errors)
body: <p>I have a simple login page using passport.js. </p>
  
  <pre><code> $("#loginUser").on("click", function () {   //login button handler
              var User = {
                  username: $('#username').val().trim().toLowerCase(),
                  password: $("#password").val().trim()
              };
              //$("#password").val("");
              $.post("/login", User);
          });
  </code></pre>
  
  <p>The code for the post route for "/login" is below (taken from passport docs):</p>
  
  <pre><code>app.post('/login', function (req, res, next) {
          passport.authenticate('local', function (err, user) {
              if (err) { return next(err); }
              if (!user) { return res.redirect('/'); }
              req.logIn(user, function (err) {
                  if (err) { return next(err); }
                  return res.redirect('/home/' + user.user_id);
              });
          })(req, res, next);
      });
  </code></pre>
  
  <p>Below is the code for the "home" route:</p>
  
  <pre><code>  app.get("/home/:user?", function (req, res) { //home page
      console.log(req.params.user)
      if (req.user) {
        console.log(path.join(__dirname, "../public/home.html"))
        res.sendFile(path.join(__dirname, "../public/home.html"), (err) =&gt; {
          if (err) {
            console.log(err);
          } else {
            console.log('file sent!');
          }
        });
      }
      else {
        console.log("no user");
        res.sendFile(path.join(__dirname, "../public/login.html"));
      }
    });
  </code></pre>
  
  <p>The issue I'm having is when the page is supposed to redirect to the home page, it just does nothing. The <code>console.log("file sent")</code> will trigger with no errors, even though nothing happens and the page stays on the login screen. However, if I physically type in localhost://8080/home the page will then load perfectly fine.</p>