<%@page contentType="text/html" pageEncoding="UTF-8"%>
<% String ctx = request.getContextPath(); %>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<title>Awesome Web Site - Login</title>
</head>
<body>
<main>
<%@include file="/WEB-INF/jspf/menu.jspf" %>
<%
String cp = request.getContextPath();
Boolean signedIn = (Boolean)session.getAttribute("signedIn");
String message = signedIn == null ? "Please sign in to continue." : "Username or password is not correct. Try again." ;
%>
<h1>Welcome to our awesome web site!</h1>
<fieldset>
<legend>Sign In</legend>
<p><%= message %></p>
<form action=<%= cp + "/sign-in"%> method="POST">
<label for="username">Username:</label><input type="text" id="username" name="username" required>
<label for="password">Password:</label><input type="password" id="password" name="password" required>
<button type="submit">Sign In</button>
</form>
</fieldset>
</main>
</body>
</html>