Cleaned up the calls from the background to the GUI thread, the logout due to timeout is now working