Maybe you should change the order of Acegi Filter and Character Encoding Filters! On the other hand I should notice that if you are working with the frameworks like Spring MVC or Struts(If dispatcher or action servlet startup is not specified) you should specify a controller or action instead of plain JPS for login or logout pages!
I hope this cases help you but I advise you first check the order of Filters! change the order of them and then restart your web application!