Fixed loop due to csrf logout