Allow user to register and fix a few bugs