Replaced 'break' with 'exit' and inserted 'isset' on cookie-check