Fixes a security bug which enabled registered users to change their userType