<% 
  case @status 
  when :fail
    %><p>login failed.
      [<%=a('show', {}, context)%>Retry</a>]
      [<%=a('logout', {}, context)%>Logout</a>]
      [<%=a('nop', {}, context)%>user:(<%= @session.username %>)</a>]
      </p><% 

  when :show
%>
<%= form('login', context) %>
<table border="0" width="100%" cellpadding="0" cellspacing="0" bgcolor="#eeeedd">
<tr>
<th>user</th>
<td><input size="8" type="text" name="username" value="<%=h @session.hint %>"/></td>
</tr>
<tr>
<th>password</th>
<td><input type="password" name="password" size="8"/></td>
</tr>
<tr align="right">
<td colspan="2"><input type="submit" value="Login" /></td>
</tr>
</table>
</form>
<%
  else
%>
<p>
<% if @status == :succ %><em>Login!</em><% end %>
<font color='#990000'><%= @session.hint%></font>'s Div.
<% if @session.username.nil? || @session.username == 'guest'%>
[<%=a('show', {}, context)%>Login</a>]
<% else %>
[<%=a('logout', {}, context)%>Logout</a>]
<% end %>
</p>
<%
  end
  @status = nil
%>
