adding set cookie method.