Logout Joomla at the time of logout from piwik

I have installed joomla and piwik. Following “How do I automatically login my users in Piwik when they go from my CMS to Piwik? - Analytics Platform - Matomo” I’m able to login into piwik from joomla site to see the analytics.

How can I logout joomla session, when logout from piwik? and vice-versa. Can any one help me in doing this?

Please ask or sponsor the Joomla Piwik plugin developer so he could add this functionality.