Improve stability of tests for periodic job

Now we use threading.Event instead of just sleeping and some luck.

Change-Id: I404f96a2331955e00c0cee925d025f3dbbe073e6
Make API entry points available without authentication

Change-Id: Ic8ad9d79fdbab11b33aca8c2510cf454c9e69c16