I have done this today, the page that I have had the login boxes display on is not even php. Only a plain html form is needed.
Insert this into the HTML output of your page
PHP Code:
<form action="http://yoursite.com/forum/member.php" method="post">
<b>Your User Name:</b><input type="text" name="username" value="" size="25"><br>
<b>Your Password:</b><input type="password" name="password" value="" size="25"><br>
<input type="hidden" name="action" value="login"><br>
<input type="submit" value="Login!">
</form>
You'll need to change the form tag's action parameter to point to your member.php file.
You can have a look at the template "error_nopermission_loggedout" for reference, this has a similar form on it too.
Hope this helps!