Add password function