Bug fix in user model and registration form