Replace CreateThread woth _beginthread so no CRT memory leaking.
Merged 'develop'.
Login process probably implemented.