auth template added
working a bit on the robustness of the system