<div class="authform">
  <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :role => 'form'}) do |f| %>
    <h3>Sign in</h3>
    <%= devise_error_messages! %>
    <div class="form-group">
      <%- if devise_mapping.registerable? %>
        <%= link_to 'Sign up', new_registration_path(resource_name), class: 'right'  %>
      <% end -%>
      <%= f.label :email %>
      <%= f.email_field :email, :autofocus => true, class: 'form-control' %>
    </div>
    <div class="form-group">
      <%- if devise_mapping.recoverable? %>
        <%= link_to "Forgot password?", new_password_path(resource_name), class: 'right' %>
      <% end -%>
      <%= f.label :password %>
      <%= f.password_field :password, class: 'form-control' %>
    </div>
      <%= f.submit 'Sign in', :class => 'button right' %>
      <% if devise_mapping.rememberable? -%>
        <div class="checkbox" style="width:150px">
          <label>
            <%= f.check_box :remember_me %> Remember me
          </label>
        </div>
      <% end -%>
  <% end %>
</div>

<div class="authform">
  <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :role => 'form'}) do |f| %>
    <h3>Sign in</h3>
    <%= devise_error_messages! %>
    <div class="form-group">
      <%- if devise_mapping.registerable? %>
        <%= link_to 'Sign up', new_registration_path(resource_name), class: 'right'  %>
      <% end -%>
      <%= f.label :email %>
      <%= f.email_field :email, :autofocus => true, class: 'form-control' %>
    </div>
    <div class="form-group">
      <%- if devise_mapping.recoverable? %>
        <%= link_to "Forgot password?", new_password_path(resource_name), class: 'right', tabindex: '-1' %>
      <% end -%>
      <%= f.label :password %>
      <%= f.password_field :password, class: 'form-control' %>
    </div>
      <%= f.submit 'Sign in', :class => 'button right' %>
      <% if devise_mapping.rememberable? -%>
        <div class="checkbox" style="width:150px">
          <label>
            <%= f.check_box :remember_me %> Remember me
          </label>
        </div>
      <% end -%>
  <% end %>
</div>

Fix tab bug in sign in
Fix tab bug in sign in
