Navigating the Loan Application Lifecycle: The Power of State Machines