important fix that toggle test/production works correctly

a important fix to the module, it now goes to live platorm if you choose production mode in backend configuration.