When Ying Tan became chief executive of Habito in May, the digital mortgage broker was arguably not in the best shape.