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.

Fixes itself.

@blizzz Do you agree?