I've been having the same problem all week. I can log in, get to a world or the character editor, even see friends online but I cant message them, and the momnet I lookk at user worlds I get disconnected..
Edit: Actually, a few minutes of research, apparantly quitting Megasync fixed this, may be worth a try @TrissMeri