ender api + make cookies refresh automatically on set

+ add enderjs tests