Added basic key validation but a bug remains where the client will say the server accepted without getting a response.