How to view the user's status?
You can't know if the person is behind its pc, reading the website but you can know the last access of the user (last time he done an http request to the site I suppose, load a page, submit a comment, etc, but I'm not totally sure about that). You need to look the property "access" of the UserSession. 

For example, for the current user, the code is:

$session_current_user = \Drupal::currentUser()-&gt;getAccount();
$last_access = $session_current_user-&gt;getLastAccessedTime();


The property is a timestamp. You need convert if you want display it on you're site. So, you can now calculate when you considere your user Absent and determine after how many time you considere your user Offline. You can do all these calculation in your template.php file and used your results in your twig file.