edit onBackPressed logic

when back is pressed ,if the browser can go back, it will. If it can't, it wont.