This is completely separate from the users resource and routes that we did before, to simplify the code.
Let's create a new folder in routes/ to separate all the authentication route handlers
views/auth/register.ejs
<%- include('../partials/_head'); %>
<body>
**<form method="post" action="/register">**
<div class="form-group">
<label for="name">Name</label>
<input type="text" **name="name"** class="form-control">
</div>
<div class="form-group">
<label for="name">Username</label>
<input type="text" **name="username"** class="form-control">
</div>
<div class="form-group">
<label for="name">Password</label>
<input type="password" **name="password"** class="form-control">
</div>
<div class="form-group">
<label for="confirm_password">Confirm Password</label>
<input type="password" **name="confirm_password"** class="form-control">
</div>
<div class="form-group">
<label for="email">Email address</label>
<input type="email" **name="email"** class="form-control" placeholder="[email protected]">
</div>
<div class="form-group">
<label for="phone">Phone Number</label>
<input type="text" **name="phone"** class="form-control" placeholder="111-222-3333">
</div>
**<button type="submit" class="btn btn-primary">Submit</button>**
</form>
<br /><hr /><br />
<a role="button" class="btn btn-success" href="/login">Login</a>
</body>
views/auth/login.ejs
<%- include('../partials/_head'); %>
<body>
**<form method="post" action="/login">**
<div class="form-group">
<label for="name">Username</label>
<input type="text" **name="username"** class="form-control">
</div>
<div class="form-group">
<label for="name">Password</label>
<input type="password" **name="password"** class="form-control">
</div>
**<button type="submit" class="btn btn-primary">Submit</button>**
</form>
<br /><hr /><br />
<a role="button" class="btn btn-success" href="/register">Sign Up</a>
</body>