Changed to work with server instead of localhost.