Section 41B. The treasurer of any city, town or district which accepts this section may pay salaries, wages, or other compensation to any person in the service of such city, town or district by means of deposits to a deposit account or accounts of such person in any one or more savings or cooperative banks, trust companies, or credit unions incorporated in or chartered by the commonwealth; in any one or more national banking associations, federal savings or loan associations or federal credit unions located in the commonwealth; in any one or more banking companies or Morris Plan companies subject to chapter one hundred and seventy-two A; or any one or more savings or loan associations under the supervision of the commissioner of banks; provided, that such person has specifically authorized such deposits, and provided further, that if such deposits are made initially to accounts established for such persons in any one such bank, trust company, credit union, or association, the depository shall have agreed with the treasurer on terms satisfactory to the treasurer for the immediate direct transfer of such deposit to any other such bank, trust company, credit union, or association designated by each such person.