def failed_login_streak
      @failed_login_streak ||=
          begin
            results = login_histories.where.not(successful: true)
            if last_successful_login
              results = results.where('created_at > ?', last_successful_login.created_at)
            end
            results.order(created_at: :desc)
          end
    end
def failed_login_streak
      @failed_login_streak ||=
          begin
            results = login_histories.where.not(successful: true)
            if last_successful_login
              results = results.where('created_at > ?', last_successful_login.created_at)
            end
            results.order(created_at: :desc)
          end
    end
Gets the failed logins for a user since the last successful login.