Prevent name conflict in logout
Catch only syntax errors here
Make strip_entities a function
Add unicode method