fixed login method