Log in working, refactor endpoints new API sdk