I am getting this error many times in the event log and users are logged out.
Event code: 4005
Event message: Forms authentication failed for t
I was getting this same error, in our case it was caused by a load balancer. We hade to make sure that the persistance was set to Source IP. Otherwise the login form was opened by one server, and processed by the other, which would fail to set the authentication cookie correctly. Maybe this helps someone else