tidied up newuser method a little
fixed check on json - gone from request.json() to request.get_json() as advised in flask docs