passing a user id to user_is_logged_in function
If you look at the docs you'll see the function comment:


  Determines if the current user is logged in.


Emphasis mine.

So the function simply isn't supposed to do what you want to use it for, you'll need to write something custom

It's pretty easy though, see Get all logged in users in Drupal for some inspiration.