security: add login API

This is useful for RBAC in OSGI plugins.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Merge remote-tracking branch 'upstream/osgi-shiro'