Add online offline listener block