Consider the following snippets:
from login.html:
... Please enter your user name and password: <form action="check_password.mic"> User Name:<input name="username" type="text"><br> Password:<input name="password" type="password"><br> <input name="login_submit" type="submit" value="Submit"> </form> ...*******
... <MICif test="check_login($cgi->param('username'), $cgi->param('password'))"> return Pile::example::index($cgi); </MICif> <MICelse> return Pile::example::login($cgi); </MICelse> ...*******
On the basis of the result of the function check_login, we either return the index page or return to the login page. Note that the browser will believe that the page being displayed is called `check_login.mic,' but since all three of the pages of concern are at the same directory level, this is okay as far as functionality is concerned.