Judge certifies sex offender suit as class action