Allow limiting number of allowed user templates

Adds maxUserTemplates directive.
Closes #136