go back to previous page function on deep linking