Handing control back to gui thread on login