Fixes an issue with WebSecurity logout