f/#190-API-endpoint-for-retrieving-active-sessions

@cosmin-marian I've created this pull request in order to review, make some finishing touches and add some tests.