Fix for a crash when authentication fails.

Signed-off-by: Amy Worrall <amy@blackpixel.com>