added usernames into database and updated functionality and validations