edited serverController to now support error messages from the server