Move _register to a function instead of a method
Generate keypair at registration
Add tests for account settings pages