Migrate login to ApiRequest