Implemented backend api for registering users