Moved check for allow_registration into filter.

Additions to pull request #178