Fix authorization api