Upon such default, the commissioner or his duly authorized assistant may bring such action as is deemed necessary upon any bond given under the two preceding sections, may foreclose any mortgage given thereunder and sell the mortgaged property and may sell any collateral deposited with him thereunder.