Handling server responses after the submit commend is sent