Functionality of logout button now works