Revamp the cgroups and pam scripts to leverage the system setup for better performance and simplify the code.