core: Fix coverity issues

These issues were introduced due authentication refactoring

Change-Id: I57ff7df3075d4ca36a50016c6786ca8a69cee3e0
Signed-off-by: Yair Zaslavsky <yzaslavs@redhat.com>