Further Decoupled environment settings

only client\login.html  client\settings.js  api\settings.js are tightly
coupled to the environment, need to create a grrunt build to manage
deployments