fixed login code