Add origin checks to logout