better method for detecting if server is online