add authorization func