NOTE: For some reason it doesn't work in FF when the form isn't hidden. If I figure out what's wrong I'll post it here. In the mean time, don't use below code please.
I wrote this thing really fast. It's basically just a hidden iframe that loads the roundcube page in it. Then when you log into joomla it logs you into roundcube aswell. It waits until the roundcube iframe is fully loaded. It then submits the joomla form. It should work for all tabbed browsers.
I was thinking of adding the roundcube user when the user registers at the joomla site. But I have yet to do this though. I just thought I'd share this in case anyone wants to use it.
File to edit: modules/mod_login.php
Find
$posttext = $params->get( 'posttext' );
Insert
?>
Find
Replace
Find
?>
Insert
Find
Replace