title: When I submit Login form , the page just keeps loading and nothing happens (Passport)
body: <p>This is the code</p>
  <pre><code>const passport = require('passport')
  const localStrategy = require('passport-local');
  
  //Initializing Passport Middleware
  app.use(passport.initialize())
  app.use(passport.session())
  passport.use(new localStrategy(User.authenticate))
  
  passport.serializeUser(User.serializeUser())
  passport.deserializeUser(User.deserializeUser());
  </code></pre>
  <p>This is my Login Route</p>
  <pre><code>app.post('/login' , passport.authenticate('local' , {failureFlash: true , failureRedirect: '/register'}) , (req , res) =&gt; {
      res.redirect('/home')
  })
  </code></pre>
  <p>This is the HTML</p>
  <pre><code>&lt;div class=&quot;full-container&quot;&gt;
          &lt;div class=&quot;column-1&quot;&gt;
              &lt;div class=&quot;column-content&quot;&gt;
              &lt;img class=&quot;thunder&quot; src=&quot;/Thunder.png&quot; alt=&quot;&quot;&gt;
              &lt;h3&gt;LOGIN&lt;/h3&gt;
              &lt;p&gt;Manage Your Employees Like No Other&lt;/p&gt;
              &lt;div class=&quot;google-btn&quot;&gt;
                 &lt;a href=&quot;/google&quot;&gt;&lt;button type=&quot;button&quot; class=&quot;btn btn-outline-dark google-button mt-4 d-flex align-items-center justify-content-center&quot;&gt;&lt;svg stroke=&quot;currentColor&quot; fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; viewBox=&quot;0 0 1024 1024&quot; height=&quot;1.5em&quot; width=&quot;1.5em&quot;
                      xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
                      &lt;path
                          d=&quot;M881 442.4H519.7v148.5h206.4c-8.9 48-35.9 88.6-76.6 115.8-34.4 23-78.3 36.6-129.9 36.6-99.9 0-184.4-67.5-214.6-158.2-7.6-23-12-47.6-12-72.9s4.4-49.9 12-72.9c30.3-90.6 114.8-158.1 214.7-158.1 56.3 0 106.8 19.4 146.6 57.4l110-110.1c-66.5-62-153.2-100-256.6-100-149.9 0-279.6 86-342.7 211.4-26 51.8-40.8 110.4-40.8 172.4S151 632.8 177 684.6C240.1 810 369.8 896 519.7 896c103.6 0 190.4-34.4 253.8-93 72.5-66.8 114.4-165.2 114.4-282.1 0-27.2-2.4-53.3-6.9-78.5z&quot;&gt;
                      &lt;/path&gt;
                  &lt;/svg&gt;Sign In Using Google&lt;/button&gt;&lt;/a&gt;
  
                  &lt;div class=&quot;separator d-flex mt-5 justify-content-center&quot;&gt;
                      &lt;hr&gt;
                      &lt;p&gt;Or Sign-in with Company&lt;/p&gt;
                      &lt;hr class=&quot;second-hr&quot;&gt;
                  &lt;/div&gt;
  
                  &lt;form action=&quot;/login&quot; method=&quot;post&quot; novalidate class=&quot;mt-4&quot;&gt;
                      &lt;div class=&quot;mb-3&quot;&gt;
                          &lt;label for=&quot;username&quot; class=&quot;form-label&quot;&gt;Company Name&lt;/label&gt;
                          &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;username&quot;  placeholder=&quot;HZ&quot; name=&quot;username&quot;&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;mb-3&quot;&gt;
                          &lt;label for=&quot;password&quot; class=&quot;form-label&quot;&gt;Password&lt;/label&gt;
                          &lt;input type=&quot;password&quot; class=&quot;form-control&quot; id=&quot;password&quot; placeholder=&quot;Min 8 Characters&quot; name=&quot;password&quot;&gt;
                         &lt;a href=&quot;&quot;&gt;&lt;div id=&quot;emailHelp&quot; class=&quot;form-text&quot;&gt;Forgot Password?&lt;/div&gt;&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;button class=&quot;btn  mt-3 submit-btn&quot;&gt;LOGIN&lt;/button&gt;
                  &lt;/form&gt;
  
                  &lt;p class=&quot;create-account mt-4&quot;&gt;Not registered yet ? &lt;a href=&quot;/register&quot;&gt;&lt;span&gt;Create An Account&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
              &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  <p>When I submit the form , nothing happens , It just keeps loading and loading , no result , any idea what is going on ? Any help is highly appreciated Thank you.</p>