bug fixes in user registration