doLogin as method