logoutbutton is working correctly