Fixed crash due to multi thread access #660
Fixed deadlock on login due to missing lock #670
Merge pull request #678 from lodle/bugfix660

Fixed crash due to multi thread access #660 #670