changing login to api