Logging to server

-added logging to server
-log state echos input state
-resets nn on state 2