<div id="hero-background">

    <h1 id="login-title">Move</h1>
    <%= form_for(@user, url: {action: 'auth_local'}, html: { class: "card", role: "form", id: "login-form"}) do |f| %>
        <div class="card-content">
            <div class="row">
                <div class="input-field col s12">
                    <input id="last_name" type="text" class="validate">
                    <label for="last_name">Username / Email</label>
                </div>
                <div class="input-field col s12">
                    <input id="last_name" type="text" class="validate">
                    <label for="last_name">Password</label>
                </div>
                <div class="input-field col s12 center-align">
                    <button class="waves-effect" id="btn-login">Iniciar Sesion</button>
                    <p id="register-text">¿No tienes una cuenta? <%= link_to "Registrate", new_user_path %></p>
                </div>
            </div>
        </div>
    <% end %>

</div>

<div id="hero-background">

    <h1 id="login-title">Move</h1>
    <%= form_for(@user, url: {action: 'auth_local'}, html: { class: "card", role: "form", id: "login-form"}) do |f| %>
        <div class="card-content">
            <%= flash[:error] %>
            <div class="row">
                <div class="input-field col s12">
                    <%= f.text_field :email, class:"validate" %>
                    <%= f.label :email %>
                </div>
                <div class="input-field col s12">
                    <%= f.password_field :password, class:"validate" %>
                    <%= f.label :password %>
                </div>
                <div class="input-field col s12 center-align">
                    <%= f.submit "Iniciar Sesion", class: "waves-effect", id: "btn-login" %>
                    <p id="register-text">¿No tienes una cuenta? <%= link_to "Registrate", new_user_path %></p>
                </div>
            </div>
        </div>
    <% end %>

</div>

Use the rails form helpers and integrate flash messages
Modify: Use the rails form helpers and integrate flash messages
