fix the ip address bug

At the regester, the server will return the ip address back to the
client.