add logic to password template