login.login function with callback