AJAX reload

Ok I stole some script and I need some help on fixing it on one thing:
Reloading on post.
here’s the script:

Log in

Login:

<p><label for="user_password">Password:</label><br/>
<input type="password" name="user_password" id="user_password" 

size=“30”/>

  <p>
    <input name="commit" type="submit" value="Log in" /> -or-
    <a href="#" onclick="Panels.Login.hide(); return 

false;">cancel



 

  <% if @session[:user] != nil %><a href="/loging_in/logout" 

onclick=“new Ajax.Request(‘/loging_in/logout’, {asynchronous:true,
evalScripts:true}); return false;”>Logout<% end %>


<% if @session[:user] == nil %>

Login |
Sign up |
Forget your password?<% end %>

</div>
Now what I want is for it to reload if the user is loged in that way it shows "logout" not "login | register | forgot password?" before they reload the page. Some are thinking that they not logged in so there complaing. How do I make it reload?

bump

On May 10, 2006, at 3:18 PM, Mohammad wrote:

bump

LORD ALMIGHTY.

jeremy

Jeremy K. wrote:

On May 10, 2006, at 3:18 PM, Mohammad wrote:

bump

LORD ALMIGHTY.

jeremy

??