[P3]Call SQL login properly, as well as the template.