More robust logout redirection