Use getStoreConfigFlag

Update the checkRequireLogin function to use getStoreConfigFlag