Finish the auto scale max limit for groups.
Refactor the Auth function to improve the code score.