Add html5 history api functionality