fixed login method
upped version