Fix angular $broadcast error in login