add password function.