Only set cookie and save new sessions if modified

 #8