added cookie in loginCtrl and listen for it in classCtrl