try setting a greeter session while loggin in
gets XDG session class correct for greeter
can it be that simple?
add hack to get logind to really close session
another hack to make pam_systemd release the session
another approach to pam_systemd problems

 - open the greeter session in a child process that stops
   itself after opening the session

 - when ready to login user session, continue the greeter
   process and allow it to exit before attempting to register
   the login session
changes to work better with xdm and systemd

- propagate SIGUSR2 from the login child to the parent (xdm)
- pam_open_session must be after fork for pam_systemd to work
- environment variables must be set before calling pam_open_session
- add PAM_RHOST when REMOTEHOST environment variable defined
  so pam_systemd can see this as a remote login session: it affects
  how power functions are treated
allow SIGUSR2 from child for dynamic displays