Add the generate password function