Auth/Misc: Code cleanup.
*Random performance optimizations
Merge pull request #10697 from Chaplain/authserver

Auth/Misc: Code cleanup.