Conditionals in Pug can evaluate statements in a manner similar to JavaScript. You can evaluate variables created in Pug, or those passed to it by your route (res.render, pug.renderFile, etc).
index.js
var authorized = true
res.render("index", {
authorized: authorized
});
index...