fixed template login problem