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.
Merge pull request #3 from markuman/master

make BASE_URL ready for http and https at the same time