Cookie implementation fix

fixed the issue where the cookie check would run regardless of user
clicked the button or not
starting to implement AJAX call

have some problem with the return since the method goes to the landing
page and retrieves its HTML