Installing cinnamon or mate desktop can't login after

Can you please follow these steps to enter the Recovery Menu:

Once there, arrow key to the bottom to Drop To Prompt.
Run

sudo nano /etc/gdm3/custom.conf

Arrown key down to the line AutomaticLoginEnable=true and place a hashtag in front to comment it out. It will look like:#AutomaticLoginEnable=true
Do the same for the line:
Automatic Login=$USER to make it #Automatic Login=$USER
Tap ctrl+x to exit the editor, then the y key to say yes to save, then the enter key to save current configuration.

Back out of the Recovery Menu and reboot or proceed to normal boot and test.