fixed bug in create_user method