Fixed a bug with registration/signup code