Can't tell if the issue is with PUG or ensureAuthenticated function

Tell us what’s happening:
I am getting a console the following errors. It looks like PUG is not working correctly. The user is being created in the DB and it is taking you over to the /profile page. but this is when the following error show. I have tried looking at the ensureAuthenticated function but from what I can tell it is written correctly.

requested

10:02 PM

user being passed = freeCodeCampTester

10:02 PM

User freeCodeCampTester attempted to log in.

10:02 PM

Error: Failed to lookup view “/app/views/pug/profile[object Object]” in views directory “/app/views”

10:02 PM

at Function.render (/rbd/pnpm-volume/ed5954f0-9b67-4a4b-a129-ab68a4ad2a45/node_modules/.registry.npmjs.org/express/4.17.1/node_modules/express/lib/application.js:580:17)

10:02 PM

at ServerResponse.render (/rbd/pnpm-volume/ed5954f0-9b67-4a4b-a129-ab68a4ad2a45/node_modules/.registry.npmjs.org/express/4.17.1/node_modules/express/lib/response.js:1012:7)

10:02 PM

Jump Toat /app/server.js:154:11

10:02 PM

at Layer.handle [as handle_request] (/rbd/pnpm-volume/ed5954f0-9b67-4a4b-a129-ab68a4ad2a45/node_modules/.registry.npmjs.org/express/4.17.1/node_modules/express/lib/router/layer.js:95:5)

10:02 PM

at next (/rbd/pnpm-volume/ed5954f0-9b67-4a4b-a129-ab68a4ad2a45/node_modules/.registry.npmjs.org/express/4.17.1/node_modules/express/lib/router/route.js:137:13)

10:02 PM

Jump Toat ensureAuthenticated (/app/server.js:109:16)

10:02 PM

at Layer.handle [as handle_request] (/rbd/pnpm-volume/ed5954f0-9b67-4a4b-a129-ab68a4ad2a45/node_modules/.registry.npmjs.org/express/4.17.1/node_modules/express/lib/router/layer.js:95:5)

10:02 PM

at next (/rbd/pnpm-volume/ed5954f0-9b67-4a4b-a129-ab68a4ad2a45/node_modules/.registry.npmjs.org/express/4.17.1/node_modules/express/lib/router/route.js:137:13)

10:02 PM

at Route.dispatch (/rbd/pnpm-volume/ed5954f0-9b67-4a4b-a129-ab68a4ad2a45/node_modules/.registry.npmjs.org/express/4.17.1/node_modules/express/lib/router/route.js:112:3)

10:02 PM

at Layer.handle [as handle_request] (/rbd/pnpm-volume/ed5954f0-9b67-4a4b-a129-ab68a4ad2a45/node_modules/.registry.npmjs.org/express/4.17.1/node_modules/express/lib/router/layer.js:95:5)

User is in the DB. I have also tried deleting the user and letting it be recreated for a fresh start and has not resolved the issue.
Screen Shot 2020-06-13 at 10.05.08 PM

Your code so far
Here is my Glitch link.

and here is the live link.
https://gustheitguru-fcc-temp-engine.glitch.me

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36.

Challenge: Registration of New Users

Link to the challenge: