Refactor flow controller to put login first, fix build errors