I have a release ready application which works fine one day, all Ive changed is added a field to the database built and I'm suddenly having this issue.
When I login it shows the correct role and state (logged in). When I logout it dosent change its state to logged out (anonymous template). Though I can see the .ASPAUTH Cookie has been deleted in the browser tools.
Several refreshes later it changes to the Anonymous Template.
Then on logging in again, the auth cookie is created but its still stuck in the Anonymous Template and only changes to the Logged in template after about 5 page refreshes.
Ive tried this on IE11 and Chrome32, the issue is exactly the same.
Found the problem, when page caching is enabled on the page you redirect to after you Login or Logout. The LoginView dosent update itself till the cache has expired.
As I was caching without varyByHeader, param or custom. This may not be the case if I use these. Yet to learn them.