cleanup in auth_required view + added test case for FlowExchangeError