Secure implementation of a simple (RESTful) chat webservice