add user detect in user.rb