Add find_by_code to user model.