added logic to logout button that hopefully works