Fixes issue #495: adding a user from admin fails
a nicer approach to solving #495
Merge pull request #511 from ambv/master

Fixes issue #495: adding a user from admin fails