login method and use newest API