title: failed_attempts not increment, Devise Rails 5
body: <p>I have Ajax login with Devise with overridden controller <code>Sessions</code> and method <code>create</code>:</p>
  
  <pre><code>class SessionsController &lt; Devise::SessionsController
  
      def create
          resource = User.find_for_database_authentication(email: params[:user][:email])
  
          unless resource
              render json: 0
          end
          if resource.valid_password?(params[:user][:password])
              sign_in :user, resource
              return render json: 1
          end
      end
  end
  </code></pre>
  
  <p>Login works fine, but If I try with wrong password, it not increment column <code>failed_attempts</code>.</p>
  
  <p>I have <code>:lockable</code> in the model <code>User</code> and all the columns in the table.
  Failed attempts works fine without override the class <code>Sessions</code>.</p>
  
  <p>I know, I need to use some method or override <code>find_for_database_authentication</code> method, but I don't know what is the name of this method.</p>