Added username Validation and made some other minor changes.