Fixes several bugs with user administration
Merge branch 'master' into staging