fix #589 ignore null values of first_name, last_name to generate username

Fix from issue #559. I added an if to ignore first_name and last_name attributes when they are null for generating an username using the method generate_unique_username