Some refactorization, separated TOS rendering action from as_callback. as_callback now redirect user to uri endpoint correctly. There is still a problem when you try to see the terms of service and then go back to the audience sync authorization page. Maybe history.back() could help...