Fixed.
I did
triggerServerEvent("submitLogin", getRootElement, username, password)
but it should have been
triggerServerEvent("submitLogin", getRootElement(), username, password)
the lack of parenthesis made it think getRootElement was a function.
Also there were a few capitalization typos in my script.