login method updated