You shouldn't call scripting additions within "tell app..." blocks, and all you're using it for is to get a file's name. You could do this instead:
on run
my startWeb()
global myPath, gMyPosixPath, gMyName
set myPath to (path to me)
set gMyPosixPath to POSIX path of myPath
set saveTID to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"/"}
set gMyName to text item -1 of gMyPosixPath
set AppleScript's text item delimiters to "."
set gMyName to first text item of gMyName
set AppleScript's text item delimiters to saveTID
my assureMeLoginItem()
do shell script "defaults write " & prefsDomain & space & myNameKey & space & the quoted form of gMyName
end run
My preference would be to declare the globals outside the run handler, along with the properties, but that's probably a simple matter of taste.