adding validation for uniquness of user name and other misc changes added