disconnect added

write crossdomain when it must

disconnect old sessions