fixed some flow orders in router that might have causes rendering problems.  Made ensureLogin use consistent