Fix sending friend online notifications.
Bunch of other fixes that go along with the last commit.