It sounds like you haven't uploaded the file mambointegration.php to your UBB.threads directory. Either that, or that it has the wrong permissions set.
As for the login problem, could you try to make to following changes to classes/mambo.php
Find this code:
<br />if ( $bad == "yes" ) {<br /> echo "<script>alert(\""._LOGIN_INCORRECT."\"); window.history.go(-1); </script>\n";<br /> exit();<br />}<br />
Replace it with this:
<br />if ( $bad == "yes" ) {<br /> if ( isset($bypost) ) {<br /> echo "<script>alert(\""._LOGIN_INCORRECT."\"); window.history.go(-1); </script>\n";<br /> } else {<br /> $this->logout();<br /> mosRedirect("index.php");<br /> }<br /> exit();<br />}<br />
That might do the trick, hopefully.