CRM-14208 support new joomla authentication method
CRM-14208, CRM-14140 use more of jsproffitt patch to simplify logic
Merge pull request #2512 from lcdservices/CRM-14208

CRM-14208