More reliable error handling when not logged in.