<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@page session="true"%>

<form:form class="form-signin" method="post" action="/login" commandName="signInUser">
    <h2 class="form-signin-heading">Registered users</h2>

    <label for="signInEmail" name="email" class="sr-only">Email address</label>
    <form:input path="email" name="email" id="signInEmail" class="form-control" placeholder="Email address" required="required" />

    <label for="signInPassword" name="password" class="sr-only">Password</label>
    <form:password path="password" name="password" id="signInPassword" class="form-control" placeholder="Password" required="required" />
    <form:errors path="password" cssClass="error-form" />

    <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />

    <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
</form:form>