add alert box and fix bug in user controler