fix issue when DNS resolves fluctuate

clean-up redundant code and fix issue with DDNS.

DDNS addresses will often fluctuate because DNS servers are load-balanced and don't all have the updated ip..
this solution will try and resolve the DNS if a sign_in fails. This is better because it wont try to resolve the DNS on every connection /flipflopping between a bad IP and a new IP.