add json err msg in user reg and user login