only sort by login / name as we only display these
fix and clean up alphabetized for groups and users
only use keys for the matching castle_type