Moved check for allow_registration into filter.