Change API, add login method.