Finished server connection functionality!