The instructions in the tutorial that you followed are out-of-date because the default login display manager in Ubuntu 18.10 is gdm3, not lightdm. Uninstall the packages that you installed by following the instructions from How to set a PIN password or a short password in Ubuntu Linux, and reinstall the default login display manager (gdm3).
Access a virtual console by pressing the keyboard combination Ctrl+Alt+F3 from the screen where the system is stopped when trying to boot the computer.
To login from a virtual console:
login: prompt type your username and press Enter.
Password: prompt type your user password and press Enter. After you have logged in, you can run commands from the virtual console.
Run the following commands.
sudo apt purge libpam-pwdfile lightdm
sudo apt install gdm3
sudo dpkg-reconfigure gdm3
sudo dpkg-reconfigure gdm3 will open up a new window allowing you to select gdm3 as the default login display manager. Use the arrow keys to select gdm3 and press the Tab key to put the focus on <OK> and press Enter. Then reboot by running this command: