<!DOCTYPE html>
<html lang="en" dir="ltr">
    <head>
        <meta charset="utf-8">
        <title></title>
    </head>
    <body>
        <h1>
            <% if(currentUser){ %>
                Welcome <%=currentUser.username%>!
            <% } else { %>
                Welcome!
            <% } %>
        </h1>
        <nav>
            <ul>
                <li>
                    <a href="/sessions/new">Log In</a>
                </li>
                <li>
                    <a href="/users/new">Register</a>
                </li>
                <% if(currentUser){ %>
                    <li>
                        <form action="/sessions?_method=DELETE" method="POST">
                            <input type="submit" value="Logout">
                        </form>
                    </li>
                <% } %>
            </ul>
        </nav>
        <% if(currentUser){ %>
            <main>
                Go to the <a href="/app">app</a>
            </main>
        <% } %>
    </body>
</html>
