added login method