I am starting fresh with the template that works. I think my mistakes stem from not realising everywhere that I have to wait for something asynchronous to finish.
PUZZLE
I have a component in ConnectionModule called AuthConnection that was created by the template. But its not in the dfm file. It is also referenced by other units.
Everything compiles and runs as. But if I make any changes to the ConnectionModule (such as naming the component or the form). it complains about the AuthConnection of type TXDataWebConnection, missing.
I have confirmed that I am changing every reference to those entities (with Grep).
This is an overlook from the template, indeed. Is this causing the issue? You can try to simply remove it from the code and see if it's the root of the cause.