Change utils.py, app.py, and test.py to better support elasticsearch tests
Mod:
    app.py
        - correct some typos, refactored some code in post functions
    models/user.py
        - get rid of rendundancy