Hi, Create 2 DIVs, one for login(username, password, submit controls) & another one for logout(logout link).
Assume DIVLogin for Login & DIVLogout for Logout
using javascript, when user logged in then call the script
document.getElementById('DIVLogin').style.display = 'none';
document.getElementById('DIVLogout').style.display = 'block';
otherwise call this
document.getElementById('DIVLogin').style.display = 'block';
document.getElementById('DIVLogout').style.display = 'none';