Rename type to user_type in User