A: 

your initApp() doesnt seem to be called from anywhere, (unless its listed outside of the script youve pasted) so your user might be null when you are trying to add the EventListener

shortstick