fixing error with login api script