Enabled access to mysql from within the VM. Bit of refactoring on RegistrationController.