fix logical bug in user_controller