add register & offline pc methods. cleanup api thread lifetime