Fixed possible undefined property on popup reference during login