Detecting window.popstate() event for when user click forward/back button and loading appropriate view