Errors no longer show when cookie isn't set.

Added refresh method and silenced undefined errors, because there is no
way that the page will load without refreshing and thus creating and
making sure the cookie exists.