I've had this problem when I was creating my custom portal. Things you should remember: Cookies need to be set, try logging in from the forums and then going back to that page with a CRT+F5. (Hard Refresh)
Make sure all paths in your HTML is correct. vBulletin default template point to URL like so:
Code:
<script type="text/javascript" src="clientscript/vbulletin_global.js"></script>
<script type="text/javascript" src="clientscript/vbulletin_menu.js"></script>
Use full URLS like:
HTML Code:
<script type="text/javascript" src="$vboptions[bburl]/clientscript/vbulletin_global.js"></script>
Since your no longer in the forums directory. Should work, as I don't see a problem with your code.
Edit: This might help, adding a slash...
PHP Code:
chdir('/home/mysite/public_html/connect');
To:
PHP Code:
chdir('/home/mysite/public_html/connect/');