Add retry function to client registering