refine login routing and timing of sync