added cookie support
added negative expire time