Desktop environment disappears after login

Sounds like a slightly malfunctioning lid-switch:
(monitor open but switch doesn't detect it and puts the laptop in 'sleep' as soon as you login)

try this setting:
controlcenter->powermanagement->when laptop lid is closed: Do Nothing
(both for 'on ac' and 'on battery)

If the problem does not appear anymore, it is a faulty lid-switch.
(a hardware problem that can be solved by repairing/replacing the switch)