If you're getting randomly logged out of Snapchat, let me ask you one question: Are you using an iPhone?
My guess is you are.
There is a big in iOS7 with the background app refresh that causes certain apps like Snapchat or Instagram to log out for some reaosn.
There are two solutions:
1. Update your iOS. The latest version should fix this bug, and it's worth updating anyway!
2. Turn off background app refresh (also a good idea because it stops your battery draining as quickly).