Context switching for client