After installing Raspbian Stretch Lite, I would like to install a GUI: Choose LightDM, but after reboot, when I insert my username and password (both correct), the system will come back at the same screen, asking me to insert the username and password again. How can I solve this?
There is a very good article at https://www.raspberrypi.org/forums/viewtopic.php?t=133691 that explains what is need and several different options to add GUI to Raspbian Lite.
This work for me on Raspbian Stretch Lite:
sudo apt-get install --no-install-recommends xserver-xorg -y
sudo apt-get install --no-install-recommends raspberrypi-ui-mods lxterminal gvfs -y
sudo raspi-configchoose "3 Boot Options - Configure options for start-up", "B1 Desktop / CLI - Choose whether to boot into a des", "B4 Desktop Atologin Desktop GUI, automatically logged in as 'pi' user", "Ok", and reboot.