fixed bug for login/register template, added common page template