handling authorization dialog