Add login templatefactory