update to the new login api