Working on connection and initial authentication