Implemented working secure cookie proof of concept code