Back button functionality implemented