Fixed crash on logout from js due to wrong thread #DESURA-973