To get correct links, you will have to use a different template in the code on the main page. Create a template called "loggedin_new" (or anyname you prefer), and change the link so that it puts a forum/ in it.
Add template - loggedin_new
Code:
<a href="forum/member.php3?action=getinfo&userid=$userid">$username</a>
Then change any reference to the template "loggedinuser" to "loggedin_new" in your code. Just make sure you don't confuse it with the other template "loggedinusers" that has an "s" at the end.
Let me know how that works
[edit]
Hmm...I'll have to check that out regarding the not logged in error...I'll get back to you
[/edit]