restapi : don't set jsessionid cookie when authentication fails(#927140)

Rest APi returns session id when authentication fails and the user
makes calls with "prefer: persistent-auth"

Change-Id: I84907ab56e99ebb875124f42345d691edad3cdbe
Bug-Url: https://bugzilla.redhat.com/927140
Signed-off-by: Ravi Nori <rnori@redhat.com>