Added logout funcionality on back button (on main page) and exit on back
button (on login page)