`cPFence Worked well for me, although I had to change it a bit since that one has the webmail url hard coded. This worked for me:
function enhance_ClientArea($params)
{
$systemurl = Setting::getValue('SystemURL');
$domain = $params['domain'];
$webmailLink = 'https://mail.' . $domain;
$domainIP = gethostbyname($domain);
$code = '<form action="'.$systemurl.'/clientarea.php" method="POST" target="_blank">
<input type="hidden" name="action" value="productdetails">
<input type="hidden" name="id" value="' . $params['serviceid'] . '">
<input type="hidden" name="dosinglesignon" value="1">
<input type="submit" value="Login to Control Panel">
<input type="button" value="Login to Webmail" onclick="window.open(\''.$webmailLink.'\')">
</form>';
$code .= '<br ><p>Your Domain : ' . $domain . '</p>';
$code .= '<p>Your Server\'s IP : ' . $domainIP . '</p>';
return $code;
}