Fixing bson binary TypeOf exception after fixing issue 1612

After fixing issue 1612, sometimes (encountered with auth) we have values that are not strings, so we had to convert them. See topic on developers group: https://groups.google.com/forum/#!topic/web2py-developers/6MKjeIzYhxI