Does one thing, logs you out of Messages when your screensaver starts, and logs you back in when it ends. So I guess that's actually two things. Build it with Xcode or download it, either way put it in your Login items and enjoy.
bill-transue/ChatSaver
Logs you in and out of Messages when your screensaver starts and stops.
Objective-C