Move login to a widget, allow widgets to get information about themselves, integrate event handling