restapi: invalidate session only when it expires

Change-Id: Ib85c38dea961b252853bcae48912aa40a4ff7e77
Signed-off-by: Michael pasternak <mpastern@redhat.com>