bug fixes, moved js to own file, cookie implementation started