Use UID instead of login name

Login name can be something different and thus I'm pretty sure this will break in combination with external auth providers such as LDAP.

@blizzz Do you agree?