Widget is to be compatible with all themes

If you want your widget to fit any theme with the colours you need to add some plugin (or widget) options that your widget will get easily.

In another thinking, if you use less colour in your css, default tag theme colours will be display. Working with div instead of table, is easier, and will save time about css reset, media queries (if needed).

Look at the Twenty Seventeen (available since WordPress 4.7 beta 2), there is the same login widget available .