added $window.refresh / $window.location at the login/logout places, to re-initialize angular on login/logout