fixed register cookie bug
refactor this
updated game