login method extract