Add detect empty name or password function and error message