fixed login sequence