reworking server and post request
fixed connection error for server