fixed major bug in auth-dialog trying to release unallocated memory from getenv

handling another case if auth_type is unset