code need to be refactored, joinEvent - looks like working method, registerUser - don't work