Trim username when changing permission or adding proxy user

Fixes #162