solving authorization problem