changed user import for django 1.5 compat and used hashlib instead of deprecated hashcompat