You will find that you sometimes need to find out if a friend is online or not.
Visit the member’s profile page. If they are online there will be a green dot to the left of their name on the cover image.
Note, that all members have the option to tick the box in their Preferences, that will hide their online status. If this is done, then you will not know if a member is online.