I have embedded my Squirrelmail login into the front of my wordpress blog by putting into the header.php the following function
The default squirrelmail code uses the format document.forms. this causes the code to see the first form on the page which may not be your Squirrelmail Embedded Login Form. So change every instance of document.forms. to document.forms.FORMNAME. as above.
This has to go in the body tag
Then in the sidebar.php or in whichever page you have the form defined add a name for the form…