started moving logic out to library
started moving user funcs out to lib too
removed user class from flask code