fixed some issues with user registration