connects to server in config file