Intercept XMLPullParser exception on login and show the correct message

Fix #997