Fixes bug - user.type is nil if a default User is created.