No judgment shall be entered within 30 days after the giving of such notice and the state or other corporation or department with which such bonds are pledged and any other person entitled to the protection of such pledge may be admitted on its motion as a party to the action, and the court shall determine the rights of all parties in the premises.