Fixed write to socket in client (login only).