I want to make a chat application in java but when I'm trying to log in to the server it gives me an error or it has unending loop. I cant find the error.

when I try to log in to the server using...