authorize modal working