Create api object at and only at service initialization

As there is scheduled tasks which invoke api in a scheduled time
interval, it is good for the performance and avoid flooding the
webadmin event log with login messages

This patch fixes #5

Signed-off-by: walteryang <walteryang47@gmail.com>