working connection to server on startup