Thanks Brad! getting closer... I'm sure you could help drive this over goalline

I sent you email...
----
You will see the issue if you go to any forum threadlist page on my work-in-progress site, like:
http://www.theflow.com/forums/forumd...?s=&forumid=17
I finally was able to cobble together some code from error_nopermission_loggedout and username_loggedout and put it in a table top right of screen. Partial solution. But it has problems.
(1) Once you log in from that screen, it DOES return you to same place (this is good), and it DOES display your username, (this is good), but it also continues displaying the "Login" button (bad.) I was told that a form tag is in one of those other parent templates, thus when I add form actions within my new "forumdisplay" template, there are redundant tags...
(2) I also want to control the visual display of this log in, to better match how I finally got it to show up on the ForumHome page:
www.theflow.com/forums.
(3) I want the action upon "logout" to retunt me to the page I was on, rather than the "forum index" page. I'm wondering if the codebit $scriptpath is relevant? To my untrained eye, it seems to me that that code variable is what accomplished the similar "return to where you are" when one logs-IN.
Any any help would be appreciated. I am at the end of my road.
Here's the code I inserted into forumdisplay:
Code:
<table width="300" border="0" cellpadding="2" align="right" cellspacing="0">
<tr>
<td>
<form action="member.php" method="post"><input type="hidden" name="s" value="$session[sessionhash]">$logincode
</td>
<tr>
<td>
<normalfont>
<input type="hidden" name="action" value="login">
<input type="hidden" name="url" value="$scriptpath">
<input type="submit" class="bginput" value="Login!">
</form>
</normalfont>
</td>
</tr>
</table>