Implemented more of the server logic, fixed an embarrassing memcpy bug in the SSL client