Initial decomposition of templates with logout functionality