Express Passport.js Success redirect doesn't load page, request keeps pending

I found an answer to my question, the problem was that the User model was not defined in the script where serializeUser and deserializeUser were defined. I could not figure out what was going on, because I did not define any action in catch all handler, so a thing to remember, make sure to have catch all handler defined to know what is happening

app.use(function(err, req, res, next) {
    console.log(err);
});