fixes for handling null returns during failed authentication