public void run() throws Exception {
// get the first task
Task task = tasksRef.get().remove();
// run it
task.run();
// schedule the next task
if (tasksRef.get().isEmpty()) {
// we are all done -- call cleanup logout
UserManager.getUserManager().cleanupClient(clientID);