I put my ejs template file in views folder like:
ejs
views
views | |--foo.html | |--layout.html
so I config my ejs template
Try to use ejs-locals then you can do this in a login.ejs file:
<% layout('layout') -%>