Rewrite in CoffeeScript - fixed the /register endpoint.