Improve create_user function (closes #1)