This note are about Raspbian based on Debian 9 Stretch, which uses systemd.
Using raspi-config you can go to the menu Boot Options ⇒ Desktop / CLI, where you can choose:
Beware that you should execute raspi-config after a sudo su, otherwise options B2 and B4 cannot determine the non-root user to be used. You can force that user setting the shell variable:
The Desktop Autologin is performed with Lightdm Desktop Manager, configuring the file /etc/lightdm/lightdm.conf:
Choosing the Desktop Autologin will enable also a Console Autologin on the VT1, with the same non-root user. The config is obtained via a symlink:
/firstname.lastname@example.org -> /lib/systemd/system/getty@.service
and a configuration file /email@example.com/autologin.conf.