# EXHIBIT 10.17

REVOLVING LINE OF CREDIT NOTE

|$1,000,000.00 |  | Minneapolis, Minnesota October 1, 2004 | 
|------------- |  | -------------------------------------- | 

FOR VALUE RECEIVED, the
undersigned UNITED FINANCIAL CORP. (Borrower) promises to pay to the order of WELLS FARGO BANK, NATIONAL ASSOCIATION
(Bank) at its office at Correspondent Banking Minnesota Officer at 6th and Marquette Minneapolis, Minnesota, 55479 or
at such other place as the holder hereof may designate, in lawful money of the United States of America and in immediately
available funds, the principal sum of One Million Dollars ($1,000,000.00), or so much thereof as may be advanced and be
outstanding, with interest thereon, to be computed on each advance from the date of its disbursement as set forth herein.

INTEREST:

(a)     Interest.   The
outstanding principal balance of this Note shall bear interest (computed on the basis of 360-day year, actual days elapsed) at a
rate per annum one and one-half percent (1.50%) above the Fed Funds Rate in effect from time to time. The term Fed Funds
Rate means a fluctuating interest rate per annum set by Bank at approximately noon each business day as the rate at which
funds are offered to Bank by Federal funds brokers. Borrower understands and agrees that Bank may base its quotation upon
recognized market sources, including such quotes as are received by Bank from Federal funds brokers of recognized standing
selected by it.

(b)     Payment
of Interest.   Interest accrued on this Note shall be payable on the last day of each March, June, September
and December, commencing December 31, 2004.

(c)     Default
Interest.   From and after the maturity date of this Note, or such earlier date as all principal owing
hereunder becomes due and payable by acceleration or otherwise, the outstanding principal balance of this Note shall bear interest
until paid in full at an increased rate per annum (computed on the basis of a 360-day year, actual days elapsed) equals to four
percent (4%) above the rate of interest from time to time applicable to this Note.

BORROWING AND REPAYMENT:

(a)     Borrowing
and Repayment.   Borrower may from time to time during the term of this Note borrow, partially or wholly repay
its outstanding borrowings, and reborrow, subject to all of the limitations, terms and conditions of this Note and of any document
executed in connection with or governing this Note; provided however, that the total outstanding borrowings under this Note shall
not at any time exceed the principal amount stated above. The unpaid principal balance of this obligation at any time shall be the
total amounts advanced hereunder by the holder hereof less the amount of principal payments made hereon by or for any Borrower,
which balance may be endorsed hereon from time to time by the holder. The outstanding principal balance of this Note shall be due
and payment in full on November 1, 2005.

-1-

---

(b)     Advances.   Advances
hereunder, to the total amount of the principal sum stated above, may be made by the holder at the oral or written request of (i)
Kurt R. Weise or, ant one acting alone, who are authorized to request advances and direct the disposition of any advances until
written notice of the revocation of such authority is received by the holder at the office designated above, or (ii) any person,
with respect to advances deposited to the credit of any deposit account of any Borrower, which advances, when so deposited, shall
be conclusively presumed to have been made to or for the benefit of each Borrower regardless of the fact that persons other than
those authorized to request advances may have authority to draw against such account. The holder shall have no obligation to
determine whether any person requesting an advance is or has been authorized by any Borrower.

(c)     Application
of Payments.   Each payment made on this Note shall be credited first, to any interest then due and second, to
the outstanding principal balance hereof.

EVENTS OF DEFAULT:

This Note is made pursuant to
and is subject to the terms and conditions of that certain Credit Agreement between Borrower and Bank dated as of October 30,
2002, as amended from time to time (the Credit Agreement). Any default in the payment or performance of any obligation
under this Note, or any defined event of default under the Credit Agreement, shall constitute an Event of Default
under this Note.

MISCELLANEOUS:

(a)     Remedies.   Upon
the occurrence of any Event of Default, the holder of this Note, at the holders option, may declare all sums of principal
and interest outstanding hereunder to be immediately due and payable without presentment, demand, notice of nonperformance, notice
of protest, protest or notice of dishonor, all of which are expressly waived by each Borrower, and the obligation, if any, of the
holder to extend any further credit hereunder shall immediately cease and terminate. Each Borrower shall pay to the holder
immediately upon demand the full amount of all payments, advances, charges, costs and expenses, including reasonable
attorneys fees (to include outside counsel fees and all allocated costs of the holders in-house counsel), expended or
incurred by the holder in connection with the enforcement of the holders rights and/or the collection of any amounts which
become due to the holder under this Note, and the prosecution or defense of any action in any way related to this Note, including
without limitation, any action for declaratory relief, whether incurred at the trial or appellate level, in an arbitration
proceeding or otherwise, and including any of the foregoing incurred in connection with any bankruptcy proceeding (including
without limitation, any adversary proceeding, contested matter or motion brought by Bank or any other person) relating to any
Borrower or any other person or entity.

(b)     Obligations
Joint and Several.   Should more than one person or entity sign this Note as a Borrower, the obligations of
each such Borrower shall be joint and several.

(c)     Governing
Law.   This Note shall be governed by and construed in accordance with the laws of the State of Minnesota.

-2-

---

IN WITNESS WHEREOF, the
undersigned has executed this Note as of the date first written above.

|                       |  |                     |  |  | 
|---------------------- |  | ------------------- |  |  | 
|UNITED FINANCIAL CORP.
|                      
|By:                    |  | /s/   Kurt R. Weise | 
|                       | 
|Title:                 |  | President and CEO   | 
|                       | 

-3-

---

SECOND AMENDMENT TO CREDIT AGREEMENT

THIS SECOND AMENDMENT TO
CREDIT AGREEMENT (this Amendment) is entered into as of October 1, 2004, by and between UNITED FINANCIAL CORP., a
Minnesota corporation (Borrower), and WELLS FARGO BANK, NATIONAL ASSOCIATION (Bank).

RECITALS

WHEREAS, Borrower is
currently indebted to Bank pursuant to the terms and conditions of that certain Credit Agreement between Borrower and Bank dated
as of October 30, 2002, as amended from time to time (Credit Agreement).

WHEREAS, Bank and Borrower
have agreed to certain changes in the terms and conditions set forth in the Credit Agreement and have agreed to amend the Credit
Agreement to reflect said changes.

NOW, THEREFORE, for valuable
consideration, the receipt and sufficiency of which are hereby acknowledged, the parties hereto agree that the Credit Agreement
shall be amended as follows:

1.     Section
1.1(a) is hereby amended by deleting November 1, 2004 as the last day on which Bank will make advances under the Line
of Credit, and by substituting for said date November 1, 2005, with such change to be effective upon the execution and
delivery to Bank of a promissory note dated as of October 1, 2004 (which promissory note shall replace and be deemed the Line of
Credit Note defined in and made pursuant to the Credit Agreement) and all other contracts, instruments and documents required by
Bank to evidence such change.

2.     Section
1.3 is hereby deleted in its entirety, and the following substituted therefor:

| | 1.3.     COLLATERAL.
| | ---------------------

| | As security for
all indebtedness of Borrower to Bank under the Line of Credit, Borrower hereby grants to Bank security interests of first priority
in 1,000 shares of Heritage Bank common stock owned by Borrower.
| | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

3.     Section
4.9(a) and (b) are hereby deleted in their entirety, without substitution.

4.     Section
4.9(d) is hereby deleted in its entirety, and the following substituted therefor:

| | (d)     Allowance
for loan and lease losses not less than 100% of the total amount of Non-Performing Assets for the Bank Subsidiaries on a
consolidated basis, determined as of each fiscal quarter end, with Non-Performing Assets defined as the sum of: (i)
all loans classified as past due 90 days or more and still accruing interest; (ii) all loans classified as non-accrual
and no longer accruing interest and (iii) all other non-performing assets, including those classified as other
real estate owned as reported in the then most recent Call Report.
| | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-1-

---

5.     Except
as specifically provided herein, all terms and conditions of the Credit Agreement remain in full force and effect, without waiver
or modification. All terms defined in the Credit Agreement shall have the same meaning when used in this Amendment. This Amendment
and the Credit Agreement shall be read together, as one document.

6.     Borrower
hereby remakes all representations and warranties contained in the Credit Agreement and reaffirms all covenants set forth therein.
Borrower further certifies that as of the date of this Amendment there exists no Event of Default as defined in the Credit
Agreement, nor any condition, act or event which with the giving of notice or the passage of time or both would constitute any
such Event of Default.

IN WITNESS WHEREOF, the
parties hereto have caused this Amendment to be executed as of the day and year first written above.

|                       |  |                                            |  |     |  |                     
|---------------------- |  | ------------------------------------------ |  | --- |  | --------------------
|UNITED FINANCIAL CORP. |  | WELLS FARGO BANK,     NATIONAL ASSOCIATION
|                      
|By:                    |  | /s/   Kurt R. Weise                        |  | By: |  | /s/   Michael Bodeen
|                       |  |                                            |  |    
|                       |  |                                            |  |     |  | Michael Bodeen      
|Title:                 |  | President and CEO                          |  |     |  | Vice President      
|                       | 

-2-

---