Just to follow this up. I am currently working on pam_xdg from https://git.sdaoden.eu/code.html as a standalone solution to this. Of the several implementations available, this seems the most alive and featureful. I have the basic work done. Should be uploaded to NEW next week. Mark