I got a script like that (I use jQuery cookie js to set cookies) to display layer on first visit.
Because you are creating the cookie, it will never be null. You need to change your logic to first check if the cookie exists. If not, show the .newsletter_layer element, then set the cookie value:
.newsletter_layer