app authorization bug fix