<!DOCTYPE HTML5>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  layout:decorate="~{layout.htm}">

<head>
  <title>Login</title>
</head>

<body>
<div layout:fragment="content">
    <form onsubmit="${login}" action="${router.guardUrl()}">
        <fieldset style="width:50%;">
            <sl-input label="User name" value="${session.login}" oninput="${html.set(session, 'login')}"
                clearable="clearable"></sl-input>

            <sl-input value="${session.password}" oninput="${html.set(session, 'password')}" type="password"
                label="Password" password-toggle="password-toggle" clearable="clearable"></sl-input>
            <input type="checkbox" checked="${session.loggedIn}" />
        </fieldset>
        <button type="submit">Login</button>
        <button onclick="${fastlogin}">Fast</button>
    </form>
</div>
</body>
</html>