Implementing save for sessions with some server side logic to avoid duplicates