r8296: - split out the ejs auth functions into a separate file