Fix login sequence