What you can do is add target="_top" to your link or use javascript to navigate your top frame:
self.parent.location= "Logout URL";
Take a look at this for reference:
<a href="log_me_out.jsp" target="_top">LINK</a> <a href="javascript://" onclick="self.parent.location='log_me_out.jsp'">LINK</a>
Or else, what you can do is go to the remote page, add javascript code to remove the frames redirecting your document to the top frame:
<script type="text/javascript"> if (self.parent.frames.length != 0){ self.parent.location=document.location.href; } </script>
source share