Bug fixes with user registration