some fixes and anysync authorization