Add handling authorization functionality