Exit app if there are no more pages to go back to

Signed-off-by: Ollie <o.dzineit@gmail.com>