Raise LoginException if connection fails

Check the cookie values returned by the server and throw a
LoginException error if 'mbadlogin=1' cookie exists.