Added http.Request as additional argument to onJoin function