fixing auth redirect