Added support for no pre-existing settings.json
fix redirects for login process