Updated client and server to handle user input clientside