To remove the guest session from Ubuntu logon screen
Open the terminal (Press Ctrl – Alt – T) and run the following commands.
sudo /usr/lib/lightdm/lightdm-set-defaults -l false
To undo it or re-enable the guest account, run the commands below.
sudo /usr/lib/lightdm/lightdm-set-defaults -l true
Or run the commands below to open lightdm.conf file
gksudo gedit /etc/lightdm/lightdm.conf
Then change the line highlighted below to false and save the file.
allow-guest=false