'Returns the connected session objects.
Args:
include_unloggedin (bool, optional): Also list Sessions
that have not yet authenticated.
Returns:
sessions (list): A list of `Session` objects.'

def get_sessions(self, include_unloggedin=False):

    if include_unloggedin:
        return listvalues(self)
    else:
        return [session for session in self.values() if session.logged_in]
