Fix bug:
  application crash when user logged on with other device
  application stuck when lots of new message coming