fixed crash after failed login.

Never modify or free the element returned by dict_get_elem();