modified add user functionality