Avoid activating SSO and SSL only if not possible, closes #664