Any shareholder of an association shall be permitted to withdraw any or all of the credit value of his or her stock as shown by the books of the association, provided such stock is not pledged as security for a loan, by giving written notice of such intention to the secretary or managing officer of the association, and, at the expiration of thirty days following such notice, the member so withdrawing, or, if deceased, his legal representative, shall be entitled to receive the credit value of the stock at the time such notice was given, together with such proportion of the net profits accruing since the last dividend date, if the bylaws so provide and determine, less the admission fee, if any, or other just and lawful charges; Provided, the right to so withdraw shall not apply to shareholders of an association in process of liquidation.