static bool error_auth = false;
if ( ImGui::InputText("username", ...) )
error_auth = false;
if ( ImGui::InputText("password", ...) )
error_auth = false;
if ( ImGui::Button("Login") )
{
if ( strcmp(username, "admin") == 0 && strcmp(password, "admin") == 0 )
{
// next...