fixes logout button and updates API calls