Changed login newsocket() call

Moved the first call to the new socket