PAM authentication module refactoring

Clean up and simplification of the PAM authentication module source code.
For now, when permissions on the PAM database are too restrictive the
appropriate message is shown.