A basic controller for the client and server