Proposed fix for InvalidLogin returns 'null' message