<%= form_for Spree::User.new, :as => :spree_user, :url => spree.create_new_session_path do |f| %>
  <div id="password-credentials">
    <p>
      <%= f.label :email, Spree.t(:email) %><br />
      <%= f.email_field :email, :class => 'title', :tabindex => 1 %>
    </p>
    <p>
      <%= f.label :password, Spree.t(:password) %><br />
      <%= f.password_field :password, :class => 'title', :tabindex => 2 %>
    </p>
  </div>
  <p>
    <%= f.check_box :remember_me, :tabindex => 3 %>
    <%= f.label :remember_me, Spree.t(:remember_me) %>
  </p>

  <p><%= f.submit Spree.t(:login), :class => 'button primary', :tabindex => 4 %></p>
<% end %>

<%= form_for Spree::User.new, :as => :spree_user, :url => spree.create_new_session_path do |f| %>
  <div id="password-credentials">
    <p>
      <%= f.label :email, Spree.t(:email) %><br />
      <%= f.email_field :email, :class => 'title', :tabindex => 1, autofocus: true %>
    </p>
    <p>
      <%= f.label :password, Spree.t(:password) %><br />
      <%= f.password_field :password, :class => 'title', :tabindex => 2 %>
    </p>
  </div>
  <p>
    <%= f.check_box :remember_me, :tabindex => 3 %>
    <%= f.label :remember_me, Spree.t(:remember_me) %>
  </p>

  <p><%= f.submit Spree.t(:login), :class => 'button primary', :tabindex => 4 %></p>
<% end %>

Add autofocus to login form
Add autofocus to login form

Springing from the discussion in https://github.com/spree/spree/issues/4715, this change allows the HTML5 `autofocus` attribute to put the cursor into the email field when displaying the login screen, which removes one step from the user login process.

Closes #190
