added deferreds to ws presence and history