updated user model and tests