BugFix connection and job submission

Bug fixes in error stages for job submissions.
Also added the possibility to disconnect and reconnect a client.