Made userid an argument.  Changed .js scripts used in HTML.