The old pre-async login system (especially SE's) was this weird mess and it wasn't clear what data was flowing where, etc. Now it's a flat function with comments and a bit better logging.