fix keypair persistence. use local server for testing