So /proc/<uid>/loginuid will be filled by the uid of the user. This will fix entries in 'last' with "gone - no logout" instead of 'still logged in'
Use easy to understand names for config files (debian, redhat, suse, unix). Move all autodetection to a separate script.