#! bugfixes in login done state and closing widget