use the new api to login