State calls Jersey Shore town's beach fixes illegal, 'wrongh