refactor logic and don't allow registration if general setting is false