Added functionality to the logout button