Fix the user model and tests