Banks in three states closed as mortgage losses mount