added clientSettings.js and some additional checks

added clientSettings.js and some additional checks