fix up authorize api