Fix some dumb bugs

Um... srsly?

I also added a function to calculate unread count, it could be used to
solve remaining issues with unread count not being calculated properly.

I fixed wrong status of user being displayed on widget and broken unread
count when discreet popups are enabled (dumb typo)