implemented an easy global state hash that is held by the application.
added location header on response from post
try to convert id always to int
just some log lines
some more logging