Implement add password function.