Added backend and frontend validation for username registration