The ATSServer process sometimes stalls the system upon login, and there is nothing you can do to kill it at this point except killing it by ssh from another machine. But what to do when there is no other machine you can use to login from? It gets even worse if you activate/deactive a lot of fonts during your session.
The solution I found, which fits my needs, was to create a LogoutHook, which kills ATSServer on logout.
#!/bin/sh
killall ATSServer
Save it in a convenient place, like /usr/local/bin, and name it killATSServer.sh Then make it executable via sudo chmod +x killATSServer.sh.sudo defaults write com.apple.loginwindow \
LogoutHook /usr/local/bin/killATSServer.sh
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060511070217782