[api] avoid random failures on trigger events.

require_login was still used even though the token should be enough
[api] fix registration of new user api call
[api] follow required code change in code check