added username validation funcion