You’are using this code res.render(process.cwd() + '/views/pug/index.pug',
Did you check the index.pug file ? there are some logic, try to understand it first - then think what to do.
You’ll find there something like this if showRegistration, if showLogin
Moreover, you need a database connection to complete this, better to do it from the beginning of the section if you could not understand the point