adding server side client ip detection, test cleanup