createUser and userEnroll functions