Tweak the allowed to login code, hotfix for issue #48