response.sendRedirect(silentRedirect);
} else {
if(sm.isAuthenticated()&&logout==null)
outStr = "You are already logged in. If you wish to logout, please press <a href=\"login?logout=true\">here</a>.";
else if(logout!=null){
sm.logOut();
outStr = "Logout successful!";
if(redirect!=null)
response.sendRedirect(redirect);
} else if(passwd!=null){
/** Password supplied, proceed with login **/