made more progress on moving login logic to rest api