add method for setting persistent cookie