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
Merge pull request #82 from Crabgrass/bugfix/3117-directory-order

Bugfix/3117 directory order
Merge branch 'develop' into bugfix/4328-invite-error