User status show offline or online

Currently I am displaying all members as a list, this is working perfeclty:
Username is being displayed, avatar and biography. But I also want to display if the user is online or offline. I am going to use two different images for this, but my main focus is to show if a user is online in or not.

I have tried many things like is_user_logged_in() but this always displays true as this person has an account.
This is how my code looks like at the moment (without the online offline status):

$blogusers = get_users( 'orderby=nicename&role=subscriber' );

						foreach ( $blogusers as $user ) {
						echo '<div class="info-section" style="float: left; width: 100%; margin-bottom: 30px;"><div style="float: left; border: 5px solid white;">' . get_avatar( $user->id, 150 ) . '</div><div style="float: right; width: 80%; text-align: left; background-color: rgba(255, 255, 255, 0.6); padding: 15px; height: 160px; border-radius: 0px 0px 25px 0px;"><span class="name-section" style="color: black; font-weight: bold;">' . esc_html( $user->user_firstname ) . ' ' . esc_html( $user->user_lastname ) . '</span><br /><span class="biografie-span" style="color: black;">' . esc_html($user->description) . '</span>';
						?>

Thanks for the assistance.