Do not pass the $key to sqimap_login, that takes care of that itself.