added functionality to createUserCtrl