add the class determination on the registration page