[api] Reverted how CONFIG[:allow_anonymous] is initialzed for test