Added the ability to store the user session object into a cookie