ACCOUNTS_CONNECTION_URL does not work on iphone

EDIT: This issue has been solved. the Account URL was being overwritten by some external code. How do I remove this message?

I have been testing having two meteor apps running at the same time, and one server using the authentication and methods of the other.

I have however noticed a very odd bug where Meteor.loginWithPassword does not work at all on iphones if the server has set__meteor_runtime_config__.ACCOUNTS_CONNECTION_URL = "www.exampleBackend.com:3000"; What happens is it will completely stop executing the function regardless of browser, No error is thrown, No callback is received.

This is the code for this action

client/login/login.js

Template.login.events({
"submit form": function (event, template) {
    event.preventDefault();
    $(event.target).prop('disabled', true);
    var email = template.find("#email").value.trim();
    var password = template.find("#password").value;

    Meteor.loginWithPassword(email, password, function (error) {
        if (error) {
            alert(error)
        } else {
            alert("hit 2");
        }
    });
}});

client/lib/client.connection.js

if (typeof APS == 'undefined') APS = {};

if (__meteor_runtime_config__.BACKEND_URL) {
    APS.originalConnection = Meteor.connection;

    // Accounts is already connected to our BACKEND_URL
    APS.backendConnection = Accounts.connection;
    // Reusing same (authenticated) connection for method calls and subscriptions
    Meteor.connection = APS.backendConnection;

    _.each(['subscribe', 'methods', 'call', 'apply', 'status', 'reconnect', 'disconnect'], function (name) {
        Meteor[name] = _.bind(Meteor.connection[name], Meteor.connection);
    });

    console.log('Connected to backend', APS.backendConnection);
}

server/lib/DDPConnectionConfig.js

backendUrl = process.env.BACKEND_URL;
__meteor_runtime_config__.ACCOUNTS_CONNECTION_URL = backendUrl;
__meteor_runtime_config__.BACKEND_URL = backendUrl;

does anyone know of a way to deal with this issue?