fix url to be local
fix indentation
simple register
return userid