Modified client and server output and client input handler to be more secure