I think someone asked this same exact question a few weeks ago.
The best solution I know of is to use Arbiter, which was created
exactly for this situation. It uses cgroups to limit resource
usage, but it adjusts those limits based on login node utilization
and each users behavior ("bad" users get their resources limited
more severely when they do "bad" things.
I will be deploying it myself very soon.
https://dylngg.github.io/resources/arbiterTechPaper.pdf
Prentice
They moved Arbiter2 to Github. Here is the new official repo: https://github.com/CHPC-UofU/arbiter2
Mike