Register and save to db works. also login works