Core pr 4

Minor javascript fixes to update the page after login. 
In general I would prefer not to have references to other modules here. Since we should have some control of the response as well as the state could we ensure that the page is/is not reloaded appropriately in more generic terms.

If other modules want the same behavior from `ding_popup` things quickly become worse.