Fix loggin whitelist function