make BASE_URL ready for http and https at the same time

This will make the engine more robust while using both (http and https) simultaneously.