Black Screen/Missing Login Screen

So on my Raspberry Pi 3B, I currently have Ubuntu MATE 20.04.1 installed. I wanted to try out different desktop environments, so I installed xubuntu-core and lubuntu-core with all the recommended packages and rebooted. After I rebooted, all the services have been started correctly but after it starts, I expect the MATE login screen to appear. But now it just shows a black screen. I can press Ctrl+Alt+F2 to get to the terminal, and I uninstalled them.

How can I get back the login screen? I can get to the desktop from startx but the login screen isn't there.

EDIT: I've noticed on the black screen when I press the Esc key, it shows a black X cursor for the mouse.

It might be possible that you removed your display manager when uninstalling xubuntu and lubuntu. In the terminal, type "sudo apt install lightdm" to reinstall lightdm, which is the normal display manager that is installed with MATE.

I should have thought about that before completely uninstalling it and reflashing my SD card.