Updated user.py and fixed hash bug in functions.py